Skip to main content

WebSocket

Using net WebSocket

Server

cookbook/websocket/net/server.go
loading...

Using gorilla WebSocket

Server

cookbook/websocket/gorilla/server.go
loading...

Client

cookbook/websocket/public/index.html
loading...

Output

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