zeromq/clrzmq — Issue #49: SocketExt.Recv<T>(this Socket skt, int timeout) raises a SerializationException because of an empty stream
Author: gbaurand
Created: 2012-02-21 12:33:47+00:00
State: open

when using SocketExt.Recv(this Socket skt, int timeout), every call fails with a SerializationException
This is due to the instanciation of the MemoryStream :
var ms = new MemoryStream { Position = 0 };

It should be :
var ms = new MemoryStream(data) { Position = 0 };

This modification solves the problem