WsjasonReceive gibt jetzt zusätzlich den receiveval zurück

test
Klaus Wendel 3 years ago
parent 7347345fa3
commit ef1fe513ca

@ -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 (

@ -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