May 15, 2021 Revel
Revel provides Websockets support.
Working with a Websocket connection:
WS
route.
*websocket.Conn
of the Conn parameter.
Raise a chestnut and add a route to the
routes
file:
WS /app/feed Application.Feed
Add a controller method to accept the
*websocket.Conn
parameters:
import "code.google.com/p/go.net/websocket"
func (c App) Feed(user string, ws *websocket.Conn) revel.Result {
...
}