Hi Edward,
Seeing as you raised this issue, and I have been experiencing the same
thing, I thought I'd dedicate the day to trying to understand what is
happening, and the good news is that I've managed to solve my problems, and
gained a valuable understanding of the problem. Here's the thing.
Use TWSocket component to connect to the server using same parameters
(127.0.0.1/TCP/1099). Then send the data in the same format, then grab the
response (using OnDataAvailable event and Receive method) then gracefully
close the socket (Shutdown).
Contribute to the SSL Effort. Visit
Hi,
I have two UDP listener sockets in a worker thread (I use a thread because is a
DLL). When I receive any data in the OnDataAvailable, ReceiveFrom method call
return -1 and OnDataAvailable is triggered in a infinite loop. The same code
with Receive method works fine.
What is wrong? Could be
Hello Erich,
I see in your other mail that your problem is solved. So here I try to
answer to your additional questions.
What influences how much buffer RAM is used by each socket.
It is the socket itself and also the data. A socket takes around 4 KB.
Overlapped IO takes also pages of 4 KB but
Hello Wilfried,
thank you for your help.
I've changed my code but the problem persists. Internally RecvFrom is
Result := DoRecvFrom(FHSocket, Buffer^, BufferSize, 0, From, FromLen);
if Result 0 then
FLastError := WSocket_Synchronized_WSAGetLastError
else
FReadCount
Hello Lorenzo,
I see one bug. Possible that's the reason:
FromIPLen = sizeof(FromIP); // Add this !!
rec = server-ReceiveFrom(block, sizeof(block), FromIP, FromIPLen);
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz
--
To unsubscribe or