This project has moved and is read-only. For the latest updates, please go here.

Memory Leak

Sep 9, 2014 at 5:36 PM
I want to packet data to server. For example 04 00 00 00 30 30 30
Packet data size 7 byte but Packet data size must be 8 byte.
Server no action but second sending this data packet, Server memory goes to higher value. Please, Help this situation.
Sep 9, 2014 at 10:18 PM
I'm guessing that your server is using sockets with length prefixing, but your client is not.

I have a blog post on message framing that you may find helpful.

Sep 10, 2014 at 6:47 AM
Hi Stephen,
The second package is completed with the first packet sent. 0x00 0x00 0x00 0x30 package comes after the number is used as a second package. 805306368 bytes of packet size is going on. My question is, will you. You can set limits in how? What is the Message Lenght bytes limit value? How can I set this limit values?
Sep 10, 2014 at 1:30 PM
I believe the constructor for the socket server class will take a limit value for the maximum message size.

But of course, the actual problem is that the client is not following your application protocol.
Sep 11, 2014 at 6:20 AM
I know this data packet is wrong. But I look "What will be at bad scenerio". If some part of TCP packet loss, Windows Server application how will act. At this situation, following four byte sets Data packet size. And computer RAM memory goes Data Lenght size and server wait equal to the number this size. and then my application is locked.
Sep 11, 2014 at 2:03 PM
TCP packet loss (or any other communication corruption) cannot cause this. However, a misbehaving client can.

It looks like the socket classes currently do not support limiting the maximum message size. However, I do have example code on my blog that shows how to do that.