Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn struct { ID string // Registerd is true if the connection has received its alias Registered bool // Alias is the alias of the connection Alias string // InGame is true if the player is currently in a // game, either lobby or actually playing InGame bool // GameID is the ID of the game the player is in GameID string // IncommingMessages is the channel through wich messages from the // connection come in IncommingMessages chan []byte // Socket is the net.Conn object // the core of the struct Socket net.Conn // contains filtered or unexported fields }
Conn is the structure that defines a connection to the server
func NewConnection ¶
NewConnection returns an instance of connection. It automatically starts the reader and writer listeners
func (*Conn) Close ¶
func (conn *Conn) Close()
Close kills the reader and writer and closes the TCP connection
func (*Conn) Identification ¶
Identification returns a prefix string to identify a connection whether by its Alias if it is registered or by it's ID if it isn't
Click to show internal directories.
Click to hide internal directories.