package
0.53.1
Repository: https://github.com/shulhan/share.git
Documentation: pkg.go.dev

# README

== WebSocket examples

This package contains an example of chat server and client written using WebSocket.

To run the WebSocket server, go to directory "cmd/server" and execute,


$ go run .

There are three known user in the server: "Groot", "Thanos", and "Hulk"; all of them are represented by ID 1, 2, and 3; in order.

The client example is in directory "cmd/client", go to that directory and connect to the server as user "Groot" by executing


$ go run . chat 1

or as user "Thanos",


$ go run . chat 2

or as user "Hulk",


$ go run . chat 2

Run the server and then two or three clients, and start chatting with each others.

# Packages

No description provided by the author

# Constants

List of message type broadcasted by server.
List of message type broadcasted by server.

# Variables

Users contain list of user's account in the system.

# Structs

Account represent an example of internal user in the system.