func (*UploadProcessor) OnMessage(ws *lhttp.WsHandler) { for m := ws.GetMultipart(); m != nil; m = m.GetNext() { log.Print("multibody:", m.GetBody(), " headers:", m.GetHeaders()) } }
func (p *ChatProcessor) OnMessage(h *lhttp.WsHandler) { log.Print("on OnMessage: ", h.GetBody()) h.AddHeader("content-type", "image/png") h.SetCommand("auth") h.Send(h.GetBody()) }