Windows networking lost packet

D

dialc4

Guest
Hi,

I have a problem, when i received packet very quicky I lost some.
I think this is beacuse the async event of networking overwrite the packet before I can manage them.

Someone can help ??

BR,
Diego
 

ricardo1996

Member
I'm in the same boat:rolleyes:. I have a java server that's receiving and sending fine. Just gml client losing some data (TcP) on receiving end. Ive made a queue list on the client(GML) side. Which helped i guess in regards to resending specific data.
 

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
I'm in the same boat:rolleyes:. I have a java server that's receiving and sending fine. Just gml client losing some data (TcP) on receiving end. Ive made a queue list on the client(GML) side. Which helped i guess in regards to resending specific data.
A thing to remember: TCP is a stream-based protocol. You don't have "packets" per se, so with an external server and "raw" socket mode you will have to consider that what you are reading in async event may contain more than one packet (note: no "partial" packets). Usually approached by writing the packet length into the header so that you can safely hop over to the next packet after reading one.

Also recommended: third three-part tutorial explaining networking fundamentals.
 

ricardo1996

Member
A thing to remember: TCP is a stream-based protocol. You don't have "packets" per se, so with an external server and "raw" socket mode you will have to consider that what you are reading in async event may contain more than one packet (note: no "partial" packets). Usually approached by writing the packet length into the header so that you can safely hop over to the next packet after reading one.

Also recommended: third three-part tutorial explaining networking fundamentals.
I had that thought somewhere down in my head that would be the case lol just never thought to implement it. Thanks will try without editing to much :D.
 
D

dialc4

Guest
I'm in the same boat:rolleyes:. I have a java server that's receiving and sending fine. Just gml client losing some data (TcP) on receiving end. Ive made a queue list on the client(GML) side. Which helped i guess in regards to resending specific data.
Hi,
I did the same and also the server wait to send another package until clinet says it is ready.
Thanks a lot for your reply
 
Top