I am using the System.Messaging.MessageQueue to send and receive multicast System.Messaging.Message’s on my LAN �this works
fine.
However, I have a requirement to receive the msgs without using a message
queue.
As the MessageQueue uses
the PGM protocol (113) to send messages I am trying to build a type that listens
on protocol 113 using a socket (e.g. new Socket(AddressFamily.InterNetwork,
SocketType.Rdm, (ProtocolType)113);).
The type is receiving the data but when I try deserialize the object using
the code below it fails with a SerializationException "The input stream is
not a valid binary format. The starting contents (in bytes) are:
50-4F-53-54-20-32-33-39-2E-32-30-30-2E-32-35-35-2E ..."
Deserialization
code:
MemoryStream ms = new MemoryStream(data,offset,length);
BinaryFormatter f = new BinaryFormatter();
object obj =
f.Deserialize(ms);
Any
ideas are appreciated - thanks