Hi everyone. Please help me understand what's going on.
What could mean getting an 10054 "Connection reset by peer" error on
executing RecvPacket of TUDPBlockSocket?
This happens on Server side very rarely. In the meantime, I see 10060
"Connection timed out" on the client's side.
I do not understand how this is possible at all, because udp works without
connection setup. And the RecvPacket function shluld return an already
received packet.
Server code:
FServerSock := TUDPBlockSocket.Create;
FServerSock.Bind('0.0.0.0', IntToStr(Port));
....
s := FServerSock.RecvPacket(10);
if ((FServerSock.LastError <> 0) and (FServerSock.LastError <>
10060)) then
if (s <> '') then
Begin
FServerSock.SendString('ack');
Client code:
FUDP.Connect(ServerHost, IntToStr(ServerPort));
if (FUDP.LastError = 0) then
Begin
FUDP.SendString(AStr);
if (FUDP.LastError = 0) then
Begin
s := FUDP.RecvPacket(5000);
if (FUDP.LastError = 0) then
Begin
result := (s = 'ack');
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public