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 } } }
// Creates a new user func New(ws *websocket.Conn) *U { return &U{MsgWriter: msgwriter.New(ws)} }