BrandonPotter / SimpleTCP

Straightforward .NET library to handle the repetitive tasks of spinning up and working with TCP sockets (client and server).
Apache License 2.0
365 stars 108 forks source link

Message.Reply adding bytes at the end #23

Open fabs-rodriguez opened 7 years ago

fabs-rodriguez commented 7 years ago

Quick question. If I send a TCP message from computer A to computer B (which has the SimpleTCP app), and then on computer B, I reply to this message as follows:

message.Reply("12345");

I've realized that if I wait longer than about 450 milliseconds after receiving the data to reply, the reply does not make it through to the originator. I'm using Packet Sender to send and receive TCP data on Computer A. It appears like there are always two replies to the message sent from Computer A. However, only if Computer B replies within about 450 ms will this message make it back to computer A.

Any ideas?

fabs-rodriguez commented 7 years ago

In short, if SimpleTCP does not reply to a message within about 450ms - from what I can see on Packet Sender - the reply does not make it back to the sender...

BrandonPotter commented 7 years ago

That doesn't seem right. Can you paste the server side code?

elitefuture commented 6 years ago

I just ended up setting the string to the substring of the message - whatever, or if it's the same characters, just remove them if it ends with the characters.