|
-
Mar 28th, 2009, 01:39 PM
#1
Thread Starter
New Member
tcp/ip - consecutive serialized objects not deserializing. help!
Hi,
This is my first post on here--I've been teaching myself VB via forums like this and MSDN for about 2 years now.
I'm programming a computerized economics experiment, and I'm using a communications package that a guy I worked
with developed. He and I have been going back and forth trying to figure out what the heck is going on.
The upshot of the communications package is that there's a serializeable MQMessage class that we send back and forth, essentially just a package of an integer (Type), string (Text), and Object (Data). Most of the time, this goes according to plan.
The problem is this: If the client receives two or more messages back-to-back, the client stops raising the MessageArrived event. (and presumably, the same would hold true for the server--I should test this, but jeez-oh-man, I've been running test after test for the last week).
It's still connected, as on disconnect it throws the "Socket forcibly closed" exception. When it receives multiple messages sequentially, it's still receiving the data, it just never knows when the first message ends, and the buffer just keeps filling and filling. The problem seems to be that it can never successfully Deserialize the MQMessage object, and so it returns Nothing on the getCompletedMessage function and just keeps adding to the buffer (ABuffer.Length goes 1024, 2048, etc.). Any ideas on how to solve this would be GREATLY appreciated (I've been frustrated by this for a year or so, and have only recently taken upon myself to learn how the hell the TCP/IP part of this works to see if I can't find a solution.).
Code to follow.
--stopworth
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|