[twsocket] TWSocket.Pause

Wilfried Mestdagh wilfried_sonal@compuserve.com
Mon, 26 Jun 2000 23:40:40 +0200


Hi Davie,

Right you are. What worry me if it is OS dependant. Kathleen are you very
sure OnSessionConnected is fired in win95 and not on winNT in same
circumstances (pause also called at same point) ?

Pause/Resume can be called to trottle pure event driven TWSocket, as you do
Davie within a thread. But then one must be very carefully with the fired
events if they are automated doing some work. Maybe you remember, I have
tryed pause/resume to trottle (in the beginning where you tryed this) on
WinNT and it worked good. However I had some problems with Win95 but dont
remember exacly what.

Message handling in NT is not exacly the same as in Win9x !

rgds, Wilfried

> -----Original Message-----
> From: twsocket-admin@elists.org [mailto:twsocket-admin@elists.org]On
> Behalf Of Davie
> Sent: maandag 26 juni 2000 23:16
> To: twsocket@elists.org
> Subject: Re: [twsocket] TWSocket.Pause
>
>
>
> Yes, I was just mentioning that when you do the "RESUME" that you
> better be
> aware that several things can FIRE at that point, BUT at least
> the proper events
> are turned back on :)
>
> DAvioe
>
> Wilfried Mestdagh wrote:
>
> > Davie,
> >
> > Yes you are right but the events that can get fired is also
> depending on the
> > execution point where Pause is called (and the kind of socket
> [listening or
> > client].
> >
> > rgds, Wilfried
> >
> > > -----Original Message-----
> > > From: twsocket-admin@elists.org [mailto:twsocket-admin@elists.org]On
> > > Behalf Of Davie
> > > Sent: maandag 26 juni 2000 20:26
> > > To: twsocket@elists.org
> > > Subject: Re: [twsocket] TWSocket.Pause
> > >
> > >
> > >
> > > This was somethin g that I wanted to do a long time ago too
> and much to my
> > > dismay I noticed that the code for the resume just blindly turned
> > > on a bunch
> > > of stuff like for the READ and WRITE etc... So, then Francois
> changed the
> > > resume method to look like this:
> > >
> > > Please verify that YOURS looks like this!! It's Apr29,2000
> change that he
> > > made.
> > >
> > > procedure TCustomWSocket.Resume;
> > > begin
> > >     FPaused := FALSE;
> > >     WSocket_WSAASyncSelect(FHSocket, Handle, WM_ASYNCSELECT,
> > > FSelectEvent);
> > > end;
> > >
> > > If yours doesn't look like the above, then download the
> latest version of
> > > ICS, otherwise if it DOES look like the above, then you will
> have to set a
> > > flag for your READ/WRITE/CONNECT/OPEN events so that they know
> > > that the next
> > > event comming in is not a real one. Or more presicely, not one
> > > that you want
> > > to deal with :)
> > >
> > > SO, you say, hmmmm, how to deal with this. Well, in your main
> > > program source
> > > save off a variable that holds the state of the connect state.
> > > Then, if your
> > > OnConnection type of event is fired again, then just check the
> > > variable you
> > > had set, and if it's TRUE, then there is NO need to do the code
> > > and just do
> > > an EXIT. Of course you will need code in the disconnected event
> > > to turn the
> > > variable off :)
> > >
> > > Davie
> > >
> > >
> > >
> > >
> > > Kathleen MacMahon wrote:
> > >
> > > > I had previously posted that the TWSocket.Resume Methods
> triggers the
> > > > ipportSessionConnected event.  In order to prevent the code in that
> > > > procedure from being executed twice, I have this code:
> > > >
> > > > if Paused then
> > > >   Begin
> > > >   Paused:=False;
> > > >   lblMore.Caption:='';
> > > >   lblMore.Visible:=False;
> > > >   GoTo ExitConnect;
> > > >   End;
> > > >
> > > > Well, now it would seem that machines running Windows NT do
> not fire the
> > > > ipportSessionConnected event, as the other operating
> systems do.  So my
> > > > users of NT are unable to remove the paused indicator once
> it appears.
> > > >
> > > > Is there a way to correct this within TWSocket so I don't
> have to write
> > > > additional code which handles the OS brand?
> >
> > _______________________________________________
> > TWSocket mailing list [http://elists.org/mailman/listinfo/twsocket]
> > Visit our website at http://www.rtfm.be/fpiette/indexuk.htm
>
>
> _______________________________________________
> TWSocket mailing list [http://elists.org/mailman/listinfo/twsocket]
> Visit our website at http://www.rtfm.be/fpiette/indexuk.htm