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