Re: [twsocket] I need some help understanding TWsocket states

2007-11-28 Thread Arno Garrels
[EMAIL PROTECTED] wrote: > Its nice to have a mailing list where you can get > many people addressing the same questions :) Agreed, and don't forget the free sources. Do you realy need more? -- Arno Garrels -- To unsubscribe or change your settings for TWSocket mailing list please goto htt

Re: [twsocket] I need some help understanding TWsocket states

2007-11-28 Thread [EMAIL PROTECTED]
TECTED] >Sent: 11/28/2007 3:22:18 PM >To : twsocket@elists.org >Cc : >Subject : RE: Re: [twsocket] I need some help understanding TWsocket states > >*help -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/

Re: [twsocket] I need some help understanding TWsocket states

2007-11-28 Thread [EMAIL PROTECTED]
>--- Original Message --- >From: Arno Garrels[mailto:[EMAIL PROTECTED] > > OnSessionAvailable is called only on listening TWSockets, > as I read the post it deals with a client (connecting party). Thanks, Arno. You are right; I misread his message but didn't realize this after sending

Re: [twsocket] I need some help understanding TWsocket states

2007-11-28 Thread Pablo Harguindey
*help -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre de Arno Garrels Enviado el: MiƩrcoles, 28 de Noviembre de 2007 15:37 Para: ICS support mailing Asunto: Re: [twsocket] I need some help understanding TWsocket states [EMAIL PROTECTED] wrote: > He

Re: [twsocket] I need some help understanding TWsocket states

2007-11-28 Thread Pete Williams
Wilfried you are a total star. If you are ever in Edinburgh I'll buy you a cake (or a whisky) or whatever. That works! Wilfried Mestdagh wrote: > Hello Pete, > > >>mytwsocket.addr := '127.0.0.1'; >>mytwsocket.port := '17072'; >>mytwsocket.connect(); >> > > that's

Re: [twsocket] I need some help understanding TWsocket states

2007-11-28 Thread Arno Garrels
sage --- >>> From: Pete Williams[mailto:[EMAIL PROTECTED] >> Sent: 11/28/2007 1:49:27 PM >> To : twsocket@elists.org >> Cc : >> Subject : RE: Re: [twsocket] I need some help understanding TWsocket >> states >> > >Thank you to

Re: [twsocket] I need some help understanding TWsocket states

2007-11-28 Thread Arno Garrels
Pete Williams wrote: > My client wants to sometimes connect to the server, send a few lines > of data, and then disconnect. > > When I want to send data this is what I do > > procedure sendData(asMessage: string); > begin > mystringlist.add(asMessage); > if mytwsocket.state <> wsConnected

Re: [twsocket] I need some help understanding TWsocket states

2007-11-28 Thread [EMAIL PROTECTED]
t;Sent: 11/28/2007 2:09:51 PM >To : twsocket@elists.org >Cc : >Subject : RE: Re: [twsocket] I need some help understanding TWsocket states > >I don't mind checking simple stuff. I'm desperate, as I have a deadline for Saturday! It is definately connected

Re: [twsocket] I need some help understanding TWsocket states

2007-11-28 Thread Wilfried Mestdagh
Hello Pete, >mytwsocket.addr := '127.0.0.1'; >mytwsocket.port := '17072'; >mytwsocket.connect(); that's ok > OnSessionAvailable doesn't seem to get called ever. No you need OnSessionConnected. OnSessionAvailable is for server sockets. > In OnDataSent I do this > begin

Re: [twsocket] I need some help understanding TWsocket states

2007-11-28 Thread Pete Williams
I don't mind checking simple stuff. I'm desperate, as I have a deadline for Saturday! It is definately connected & hooked-up. Nothing is over-writing it. [EMAIL PROTECTED] wrote: > Hello: >This may sound stupid, but could you verify that > the OnSessionAvailable event is actually wired > (as

Re: [twsocket] I need some help understanding TWsocket states

2007-11-28 Thread [EMAIL PROTECTED]
-dZ. >--- Original Message --- >From: Pete Williams[mailto:[EMAIL PROTECTED] >Sent: 11/28/2007 1:49:27 PM >To : twsocket@elists.org >Cc : >Subject : RE: Re: [twsocket] I need some help understanding TWsocket states > >Thank you to the two peo

Re: [twsocket] I need some help understanding TWsocket states

2007-11-28 Thread Pete Williams
Thank you to the two people who replied. I got really good advice which I followed and this seems to have given me a working server, but I still have client problems. - I created a message-pump in a distinct thread for the DLL server, as advised. - Both client and server were changed to async p

Re: [twsocket] I need some help understanding TWsocket states

2007-11-26 Thread Wilfried Mestdagh
Hello Pete, > if myclient.state <> wsConnected then > begin > myclient.connect; > loop for 5 seconds begin You have to think async. TWSocket uses events. think on events as a OnClick event of a butten. You don't write loops to wait until a user click a button. So you have to change to:

Re: [twsocket] I need some help understanding TWsocket states

2007-11-26 Thread Arno Garrels
Hello Pete, The states are not that important, but the events are. Check this link: http://wiki.overbyte.be/wiki/index.php/Asynchronous_Paradigm and ask your questions here if it doesn't answer your question. -- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html Pete Willia

[twsocket] I need some help understanding TWsocket states

2007-11-26 Thread Pete Williams
Hello again I'm trying to write a very simple client/server socket application using TWSocket. However, I think I may not understand the use of states correctly. What I want is for the client to connect to the server, send some data, and then disconnect. If it has more data to send, I want it t