WsContainerSend und WsContainerReceive wieder freigeschaltet

master
Klaus Wendel 8 months ago
parent eef1a9e526
commit 6b475a51c1

@ -3,6 +3,7 @@ package nhooyrioWebsocketAddons
import (
"context"
"encoding/json"
"errors"
"nhooyr.io/websocket"
"nhooyr.io/websocket/wsjson"
@ -42,8 +43,8 @@ type GosmAdapter interface {
SetBuffer([]byte)
GetJson() CarrierJson
GetBuffer() []byte
//WsContainerSend(WsCommunicationMethod, *websocket.Conn, context.Context) (error, interface{})
//WsContainerReceive(WsCommunicationMethod, *websocket.Conn, context.Context, func(interface{}) interface{}) (error, interface{}, interface{}, websocket.MessageType)
WsContainerSend(WsCommunicationMethod, *websocket.Conn, context.Context) (error, interface{})
WsContainerReceive(WsCommunicationMethod, *websocket.Conn, context.Context, func(interface{}) interface{}) (error, interface{}, interface{}, websocket.MessageType)
}
func (r *GosmContainer) RevalueJson(dosth func(CarrierJson) CarrierJson) { // Überarbeite den Carrier, setze ein Ergebnis ein etc.
@ -81,7 +82,6 @@ func (r *GosmContainer) GetBuffer() []byte {
return (*r).CarrierBuffer
}
/*
func (r *GosmContainer) WsContainerSend(method WsCommunicationMethod, conn *websocket.Conn, ctx context.Context) (err error, response interface{}) {
switch method {
case SendJsonMethod:
@ -111,7 +111,6 @@ func (r *GosmContainer) WsContainerReceive(method WsCommunicationMethod, conn *w
}
return
}
*/
func WsjsonSend(ctx context.Context, conn *websocket.Conn, sendval interface{}) (err error, receiveval interface{}) {
err = nil

Loading…
Cancel
Save