You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The underlying problem with the msgp.Decode API you're using seems to be that it may create a new msgp.Reader for every call to msgp.Decode, but if multiple messages are queued on the socket when the msgp.Reader reads from it, those bytes are discarded when the call to msgp.Decode completes.
I really don't have a good idea off the top of my head how to solve that problem, but at the very least, avoiding those APIs in favour of the msgp.NewReader example I posted earlier should help get you moving.
client.go
server.go
// Output: client first run
{1 Arith.Divide}
{0 0} or {120 105} or {122 97}
{0 0}
// Output: client second run
{1 Arith.Divide}
{122 97}
{0 0}
why?
when the log.Println("hai") is valid, the calls is ok.
// Output:
{1 Arith.Divide}
{122 97}
{120 105}
The text was updated successfully, but these errors were encountered: