Documentation ¶
Index ¶
Constants ¶
View Source
const ( WriteDeadline = 10 * time.Second ReadDeadline = WriteDeadline PongWait = 60 * time.Second PingPeriod = (PongWait * 9) / 10 MessageSize = 4096 ReadBufferSize = 1024 WriteBufferSize = 1024 InteruptPeriod = 4 * time.Second )
These values are used by other Go packages.
Variables ¶
This section is empty.
Functions ¶
func SendGetRequest ¶
res: pointer to the instance of response struct
func SendPostRequest ¶
sendBody: request body res: pointer to the instance of response struct
Types ¶
type InstancePool ¶
type Messenger ¶
type Messenger struct { Register chan *Instance Unregister chan *Instance UnregisterId chan *uuid.UUID Message chan *Message // contains filtered or unexported fields }
func NewMessenger ¶
func NewMessenger() *Messenger
func (*Messenger) MakeInstance ¶
func (*Messenger) SendMessage ¶
type Socket ¶
type Socket interface { Reader() chan (interface{}) Writer() chan (interface{}) Start(read interface{}) Close() }
Socket interface defines how code can interact with the sockets.
func AcceptSocket ¶
Use the server types (http) to upgrade a connect to socket. This is the golang paradigm with the gorilla package.
func EstablishSocket ¶
Connect to a websocket by the url.
Click to show internal directories.
Click to hide internal directories.