Documentation ¶
Index ¶
- Constants
- func CreateConnection(addr net.Addr) (conn net.Conn, err error)
- func ReceiveMessage(conn net.Conn) (*message.Message, error)
- func ReceiveMessageAsync(conn net.Conn, tok token.Token, done chan<- message.Message, ec chan<- error)
- func WriteMessage(conn net.Conn, msg *message.Message) error
- type Info
- type Type
Constants ¶
const MaxUDPPacketBytes = 9000
Variables ¶
This section is empty.
Functions ¶
func CreateConnection ¶
CreateConnection returns a newly created connection with connInfo or an error
func ReceiveMessage ¶
ReceiveMessage receives and unmarshals one message.Message from conn. conn can either be a datagram (PacketConn) or a stream connection.
func ReceiveMessageAsync ¶
Types ¶
type Info ¶
Info contains address information about one actor of a connection of the declared type
func (*Info) UnmarshalJSON ¶
UnmarshalJSON implements the JSONUnmarshaler interface.
type Type ¶
type Type int
Type enumerates connection types
run 'go generate' in this directory if a new networkAddrType is added [source https://github.com/campoy/jsonenums]
func UnmarshalNetAddr ¶
UnmarshalNetAddr is a helper function that unmarshals network addresses.
func (Type) MarshalJSON ¶
MarshalJSON is generated so Type satisfies json.Marshaler.
func (*Type) UnmarshalJSON ¶
UnmarshalJSON is generated so Type satisfies json.Unmarshaler.