Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EmailAgent ¶
type Transport ¶
type Transport interface { Open() // Client will connect, server will listen Close() // Client will disconnect, server will stop listening and disconnect all clients OnConnect() // When we connect or re-connect OnDisconnect() // Handle disconnection OnMessage() // When we receive a new message from the other endpoint OnError() // When we have an error SendMessage() // Send a new message to the other endpoint SendReply() // Send a response to a message we sent }
Works for websocket client and server
type WebsocketClient ¶
type WebsocketClient struct {
// contains filtered or unexported fields
}
func (WebsocketClient) Close ¶
func (wc WebsocketClient) Close()
func (WebsocketClient) OnConnect ¶
func (wc WebsocketClient) OnConnect()
func (WebsocketClient) OnError ¶
func (wc WebsocketClient) OnError()
func (WebsocketClient) OnMessage ¶
func (wc WebsocketClient) OnMessage()
func (WebsocketClient) Open ¶
func (wc WebsocketClient) Open()
func (WebsocketClient) SendMessage ¶
func (wc WebsocketClient) SendMessage()
func (WebsocketClient) SendReply ¶
func (wc WebsocketClient) SendReply()
type WebsocketServer ¶
type WebsocketServer struct {
// contains filtered or unexported fields
}
func (WebsocketServer) Close ¶
func (ws WebsocketServer) Close()
func (WebsocketServer) OnConnect ¶
func (ws WebsocketServer) OnConnect()
func (WebsocketServer) OnError ¶
func (ws WebsocketServer) OnError()
func (WebsocketServer) OnMessage ¶
func (ws WebsocketServer) OnMessage()
func (WebsocketServer) Open ¶
func (ws WebsocketServer) Open()
func (WebsocketServer) SendMessage ¶
func (ws WebsocketServer) SendMessage()
func (WebsocketServer) SendReply ¶
func (ws WebsocketServer) SendReply()
Click to show internal directories.
Click to hide internal directories.