Re: [twsocket] Send and Shutdown oddity

2011-02-15 Thread Markus Humm
Hello, either I have implemented the suggestion of confirming the reception of my shutdowncommand and only then closing the connection completely false or it's something quite curious and different: I found out now that the problem only happens under these conditions: - in my application's setup

Re: [twsocket] Send and Shutdown oddity

2011-02-15 Thread Francois PIETTE
what does the event OnSentData _exactly_ signal? Well, there is no such event. You have OnDataSent and OnSendData which are close. OnDataSent: This is when Winsock has accepted all data from TWSocket, that is when TWSocket buffer is emptyed. OnSendData: This is when TWSocket is able to write

Re: [twsocket] Send and Shutdown oddity

2011-02-15 Thread Arno Garrels
Markus Humm wrote: > Hello, > > what does the event OnSentData _exactly_ signal? There does not exist such an event. There are two similar named events, OnDataSent and OnSendData. OnDataSent triggers after ALL data buffered in TWSocket's internal send buffer has been actually sent by winsock AP

[twsocket] Send and Shutdown oddity

2011-02-14 Thread Markus Humm
Hello, what does the event OnSentData _exactly_ signal? Does it really signal that WinSock has completed sending the data? Because in my investigations about my problem yesterday I could see that this event always fires on my sending side and reports the correct number of bytes I have sent. But in

Re: [twsocket] Send and Shutdown oddity

2011-02-13 Thread Arno Garrels
Arno Garrels wrote: > Markus Humm wrote: > > I mean if a message loop of 3 sec. doesn't give him enough time >>> Possibly the message loop isn't implemented properly? >>> Please show us some code. >> >> Ok, my message loop was constructed like this: >> >> var msg:TMessage; >>t:Dword; >>

Re: [twsocket] Send and Shutdown oddity

2011-02-13 Thread Arno Garrels
Markus Humm wrote: I mean if a message loop of 3 sec. doesn't give him enough time >> Possibly the message loop isn't implemented properly? >> Please show us some code. > > Ok, my message loop was constructed like this: > > var msg:TMessage; >t:Dword; > > begin > t:=GetTickCount; > w

Re: [twsocket] Send and Shutdown oddity

2011-02-13 Thread Markus Humm
> Markus Humm wrote: >> > Markus Humm wrote: >>> My application now has to tell the communication part (means the >>> server side of the TWSocket connection) to shut down. it sends him a >>> binary shutdown command and after a short time the client does a >>> shutdown(1) on the

Re: [twsocket] Send and Shutdown oddity

2011-02-13 Thread Arno Garrels
Markus Humm wrote: > Markus Humm wrote: >>> My application now has to tell the communication part (means the >>> server side of the TWSocket connection) to shut down. it sends him a >>> binary shutdown command and after a short time the client does a >>> shutdown(1) on the socket. >> >> There's mo

Re: [twsocket] Send and Shutdown oddity

2011-02-13 Thread Francois PIETTE
Another related question: are there two logical channels in the background of TCP, one for sending the actual data and one for signalling the close? Otherwise I cannot explain myself why the data doesn't arrive but the close does. There is only one channel. Actual data and signalling are using t

Re: [twsocket] Send and Shutdown oddity

2011-02-13 Thread Markus Humm
Markus Humm wrote: > > My application now has to tell the communication part (means the > > server side of the TWSocket connection) to shut down. it sends him a > > binary shutdown command and after a short time the client does a > > shutdown(1) on the socket. > > There's most likely something wron

Re: [twsocket] Send and Shutdown oddity

2011-02-12 Thread Arno Garrels
Markus Humm wrote: > My application now has to tell the communication part (means the > server side of the TWSocket connection) to shut down. it sends him a > binary shutdown command and after a short time the client does a > shutdown(1) on the socket. There's most likely something wrong in your a

[twsocket] Send and Shutdown oddity

2011-02-11 Thread Markus Humm
Hello, I'm using TSWocket and have the following problem: One client and one server running on the same PC (localhost, 127.0.0.1) use the socket as medium to transport commands. It normally works as it should but under certain conditions it fails like this: my application has to deal with Blueto