Documentation ¶
Index ¶
- type NetAddr
- type NetworkEntity
- func (n *NetworkEntity) Close() error
- func (n *NetworkEntity) FindResponseByMID(mid uint64) interface{}
- func (n *NetworkEntity) FindResponseByRoute(route string) interface{}
- func (n *NetworkEntity) Push(route string, v interface{}) error
- func (n *NetworkEntity) RPC(route string, v interface{}) error
- func (n *NetworkEntity) RemoteAddr() net.Addr
- func (n *NetworkEntity) Response(route string, v interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NetAddr ¶
type NetAddr struct{}
NetAddr mock the net.Addr interface
type NetworkEntity ¶
type NetworkEntity struct {
// contains filtered or unexported fields
}
NetworkEntity represents an network entity which can be used to construct the session object.
func NewNetworkEntity ¶
func NewNetworkEntity() *NetworkEntity
NewNetworkEntity returns an mock network entity
func (*NetworkEntity) Close ¶
func (n *NetworkEntity) Close() error
Close implements the session.NetworkEntity interface
func (*NetworkEntity) FindResponseByMID ¶
func (n *NetworkEntity) FindResponseByMID(mid uint64) interface{}
FindResponseByMID returns the response respective the message id
func (*NetworkEntity) FindResponseByRoute ¶
func (n *NetworkEntity) FindResponseByRoute(route string) interface{}
FindResponseByRoute returns the response respective the route
func (*NetworkEntity) Push ¶
func (n *NetworkEntity) Push(route string, v interface{}) error
Push implements the session.NetworkEntity interface
func (*NetworkEntity) RPC ¶
func (n *NetworkEntity) RPC(route string, v interface{}) error
RPC implements the session.NetworkEntity interface
func (*NetworkEntity) RemoteAddr ¶
func (n *NetworkEntity) RemoteAddr() net.Addr
RemoteAddr implements the session.NetworkEntity interface
func (*NetworkEntity) Response ¶
func (n *NetworkEntity) Response(route string, v interface{}) error
Response implements the session.NetworkEntity interface
Click to show internal directories.
Click to hide internal directories.