Documentation
¶
Overview ¶
Package examples provide an example on how to use WebSocket server and client.
Index ¶
Constants ¶
View Source
const ( BroadcastMessage = "message" BroadcastSystem = "system" )
List of message type broadcasted by server.
Variables ¶
View Source
var Users = map[int64]*Account{
1: {
ID: 1,
Name: "Groot",
Key: "iamgroot",
},
2: {
ID: 2,
Name: "Thanos",
Key: "thanosdidnothingwrong",
},
3: {
ID: 3,
Name: "Hulk",
Key: "arrrr",
},
4: {
ID: 4,
Name: `Ironman`,
Key: `pewpew`,
},
}
Users contain list of user's account in the system.
Functions ¶
This section is empty.
Types ¶
Directories
¶
Path | Synopsis |
---|---|
cmd
|
|
client
Program client provide an example of chat client that connect to WebSocket server.
|
Program client provide an example of chat client that connect to WebSocket server. |
server
Program server provide an example of WebSocket server as group chat.
|
Program server provide an example of WebSocket server as group chat. |
Click to show internal directories.
Click to hide internal directories.