github.com/insionng/yougam@v0.0.0-20170714101924-2bc18d833463/libraries/igm/sockjs-go.v2/sockjs/sockjs.go (about) 1 package sockjs 2 3 import "net/http" 4 5 // Session represents a connection between server and client. 6 type Session interface { 7 // Id returns a session id 8 ID() string 9 // Requests returns the first http request 10 Request() *http.Request 11 // Recv reads one text frame from session 12 Recv() (string, error) 13 // Send sends one text frame to session 14 Send(string) error 15 // Close closes the session with provided code and reason. 16 Close(status uint32, reason string) error 17 }