Esempio n. 1
0
func HandleLogService(ws *websocket.Conn) {
	var tId uint
	uId := "N/A"
	msgWriter := msgwriter.New(ws)
	for {
		var msg interface{}
		if err := jsonutil.UnmarshalAndLog(tId, uId, ws, msg); err != nil {
			msgWriter.ErrorAndClose(tId, uId, err.Error())
			return
		}
	}
}
Esempio n. 2
0
// Creates a new user
func New(ws *websocket.Conn) *U {
	return &U{MsgWriter: msgwriter.New(ws)}
}