Re: [twsocket] TWSocket doesn't always send my data?
I solved the problem now (at least mostly) by creating a thread and assigning the socket to this thread. The execute of the thread is mostly a message loop. The normal case now behaves as it should, but if I try to handle a "emergency" exit command (means not the normal way to quit but some allowed one in case something goes wrong), the thread's execute runs until its end but the OnTerminate handler I assigned is never called and FastMM also reports a memory leak (my thread class). Grr! But since it's in the shutdown situation it's not that important right now. I also posted on the cg.delphi.vcl.using group about my new problem. To have your thread terminate faster, you should post a WM_QUIT message to the thread (or the window you created there). This will break the message loop and let the thread terminate. So case mostly solved. Happiness -- francois.pie...@overbyte.be The author of the freeware multi-tier middleware MidWare The author of the freeware Internet Component Suite (ICS) http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] TWSocket doesn't always send my data?
Hello, I solved the problem now (at least mostly) by creating a thread and assigning the socket to this thread. The execute of the thread is mostly a message loop. The normal case now behaves as it should, but if I try to handle a "emergency" exit command (means not the normal way to quit but some allowed one in case something goes wrong), the thread's execute runs until its end but the OnTerminate handler I assigned is never called and FastMM also reports a memory leak (my thread class). Grr! But since it's in the shutdown situation it's not that important right now. I also posted on the cg.delphi.vcl.using group about my new problem. So case mostly solved. Greetings Markus -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Two questions about FTPCli
Another new questions, using existing topic. It's concerning error handling in FTPCli. I see that many local errors, such as exception when opening local stream, are converted into ftp error messages. How do I handle them (for example, I want to track file creation errors)? And another question - is returning of ftp code the one way of error reporting, or there's some exceptions raised? -- Regards, Anton -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] TWSocket doesn't always send my data?
> Ok, the "other" application, in this scenario the server has a > OnDataAvailable event where the first statement is a OutputDebugString > command so I can see with Sysinternal's DbgView which messages are > written and which not. In the good case the message can be seen in the > bad one it's missing in the debug view so it didn't happen. > > What happens between WinSock and TWSocket? Where could it go lost? It > hat the correct line end (#7, #8, #9, #0A #0D in my case). You should place your OutputDebugString in TWSocket, at the lowest level. That is in TCustomWSocket.WMAsyncSelect, for example just before Do_FD_READ is called. WMAsyncSelect is the nearly the lowest level just above WinSock. The actual lowest level is TCustomWSocket.WndProc which receive the messages dispatched by WinSock. I suggest you single step the code to try to understand why OnDataAvailable is not triggered. -- francois.pie...@overbyte.be Author of ICS (Internet Component Suite, freeware) Author of MidWare (Multi-tier framework, freeware) http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] TWSocket doesn't always send my data?
Hello Markus, Since it happen sometimes it is possible you have some where an exception that does not show up where you loose data. Other possibility I see you have a long lineEnd. Can you also test with 1 or 2 character? Maybe you have an untested situation. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz Tuesday, May 26, 2009, 22:21, Markus Humm wrote: > Hello, >> > after a little reseach and useage of that recommended trial version >> > found out that the data really gets sent (OnDataSent also triggers). >> So we are now sure that the issue is probably located in the "other >> application". The message is sent but that application doesn't see it. >> How do you know it has not been received ? I mean maybe it is received >> but >> actual processingis wrong. >> Are you able to debug that "other application" ? > Since I'm the author of both applications I have full source code. What > a benefit! ;-) > Ok, the "other" application, in this scenario the server has a > OnDataAvailable event where the first statement is a OutputDebugString > command so I can see with Sysinternal's DbgView which messages are > written and which not. In the good case the message can be seen in the > bad one it's missing in the debug view so it didn't happen. > What happens between WinSock and TWSocket? Where could it go lost? It > hat the correct line end (#7, #8, #9, #0A #0D in my case). > Any ideas? > Greetings > Markus > -- > To unsubscribe or change your settings for TWSocket mailing list > please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket > Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be