Browse Source

WsjasonReceive gibt jetzt zusätzlich den receiveval zurück

test
Klaus Wendel 2 years ago
parent
commit
ef1fe513ca
  1. 3
      crypta/crypta.go
  2. 7
      nhooyrioWebsocketAddons/nhooyrioWebsocketAddons.go

3
crypta/crypta.go

@ -10,12 +10,13 @@ Individual permissions beyond the scope of this license may be available at http
package crypta
import (
"PinGo/ebkTools"
"crypto/md5"
"crypto/sha256"
"crypto/sha512"
"fmt"
"hash"
"git.archium.org/archium_public/ebkTools"
)
type (

7
nhooyrioWebsocketAddons/nhooyrioWebsocketAddons.go

@ -22,8 +22,9 @@ func WsjsonSend(ctx context.Context, conn *websocket.Conn, sendval interface{})
return nil, receiveval
}
func WsjsonReceive(ctx context.Context, conn *websocket.Conn, dosth func(interface{}) interface{}) (err error) {
var sendval, receiveval interface{}
func WsjsonReceive(ctx context.Context, conn *websocket.Conn, dosth func(interface{}) interface{}) (err error, receiveval interface{}) {
var sendval interface{}
err = nil
//Receive
err = wsjson.Read(ctx, conn, &receiveval)
@ -38,5 +39,5 @@ func WsjsonReceive(ctx context.Context, conn *websocket.Conn, dosth func(interfa
return
}
return nil
return
}

Loading…
Cancel
Save