WebSocket Recipe

Using net WebSocket

Server

server.go




Using gorilla WebSocket

Server

server.go




Client

index.html




Output

Client

Hello, Client!
Hello, Client!
Hello, Client!
Hello, Client!
Hello, Client!

Server

Hello, Server!
Hello, Server!
Hello, Server!
Hello, Server!
Hello, Server!

Source Code

Maintainers