Documentation ¶
Index ¶
Constants ¶
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct { Cert string Key string Ready func(conn net.Conn) Message func(conn net.Conn, text *string, binary []byte) Failed func(conn net.Conn, err error) Cancelled func(conn net.Conn) // contains filtered or unexported fields }
Connection is a a tcp based connection this is for handling pure tcp connections
func (*Connection) Cancel ¶
func (connection *Connection) Cancel()
Cancel closes all connections and stops the listener from accepting new connections
func (*Connection) SendBinaryMessage ¶
func (connection *Connection) SendBinaryMessage(conn net.Conn, data []byte)
SendBinaryMessage is for sending a text based message
func (*Connection) SendTextMessage ¶
func (connection *Connection) SendTextMessage(conn net.Conn, str string)
SendTextMessage is for sending a text based message
Click to show internal directories.
Click to hide internal directories.