Browse Source

fmt.Print("ICH BIN HIER UND HIER GEHT WAS SCHIEF 0")

test
Klaus Wendel 2 years ago
parent
commit
954e069e3f
  1. 4
      nhooyrioWebsocketAddons/nhooyrioWebsocketAddons.go

4
nhooyrioWebsocketAddons/nhooyrioWebsocketAddons.go

@ -102,14 +102,16 @@ func (r *GosmBuffer) WsCommunicator(method string, ctx context.Context, conn *we
//WsCommunicator sends and receivs data to/from websocket partner
func (r *GosmContainer) WsCommunicator(method string, ctx context.Context, conn *websocket.Conn, dosth ...func(interface{}) interface{}) (error, websocket.MessageType) {
fmt.Print("ICH BIN HIER UND HIER GEHT WAS SCHIEF 0")
switch {
case (method == "sendtext" || method == "sendbinary" || method == "send") && len(dosth) == 0:
err, receiveval := WsjsonSend(ctx, conn, *r)
*r = receiveval.(GosmContainer)
return err, websocket.MessageText
case method == "receive" && len(dosth) == 1:
fmt.Print("ICH BIN HIER UND HIER GEHT WAS SCHIEF 1")
err, receiveval := WsjsonReceive(ctx, conn, dosth[0])
fmt.Print("ICH BIN HIER UND HIER GEHT WAS SCHIEF")
fmt.Print("ICH BIN HIER UND HIER GEHT WAS SCHIEF 2")
//*r = receiveval.(GosmContainer)
_ = receiveval
return err, websocket.MessageText

Loading…
Cancel
Save