Re: [twsocket] Which TWSocketServer event to capture data sent?

2006-11-21 Thread Clay Shannon
<< Maybe a typo error ?>> No, all that code was copied-and-pasted from TCPSrv1.pas.>> --The 10048 problem seemed to stem from some redundant code: procedure TfClientMain.FormShow(Sender: TObject); begin ApplicationEvents.OnException := ApplicationEventsException; if WSocketServer.Addr <> '0

Re: [twsocket] Which TWSocketServer event to capture data sent?

2006-11-21 Thread Time Bandit
> Which TWSocketServer event should I code to retrieve incoming data? Define a private procedure like this : procedure ClientDataAvailable(Sender: TObject; Error: Word); In the OnClientConnect event, you have to assign an event handler to your client socket. Something like this : Client.OnDat

Re: [twsocket] Which TWSocketServer event to capture data sent?

2006-11-21 Thread Clay Shannon
alf Of Francois PIETTE Sent: Monday, November 20, 2006 2:19 PM To: ICS support mailing Subject: Re: [twsocket] Which TWSocketServer event to capture data sent? > Which TWSocketServer event should I code to retrieve incoming data? None ! Data doesn't come from TWSocketServer but from on

Re: [twsocket] Which TWSocketServer event to capture data sent?

2006-11-21 Thread Clay Shannon
r 20, 2006 4:20 PM To: 'ICS support mailing' Subject: Re: [twsocket] Which TWSocketServer event to capture data sent? << See TTcpSrvForm.WSocketServer1ClientConnect in TcpSrv1.pas source.>> When I try to use that code, I get an EInvalidCast error, specifically, "EInvalidCast -

Re: [twsocket] Which TWSocketServer event to capture data sent?

2006-11-21 Thread Francois Piette
> << See TTcpSrvForm.WSocketServer1ClientConnect in TcpSrv1.pas source.>> > > When I try to use that code, I get an EInvalidCast error, specifically, > "EInvalidCast - Invalid class typecast" on this line: > > with Client as TTcpSrvClient do begin > > of the OnClientConnect() event handler. TWS

Re: [twsocket] Which TWSocketServer event to capture data sent?

2006-11-21 Thread Francois PIETTE
> Which TWSocketServer event should I code to retrieve incoming data? None ! Data doesn't come from TWSocketServer but from one TWSocketClient (another TWSocket derived class) which is instanciated for each incomming connection. See how it works in TcpSrv sample program. > The two that fire whe

Re: [twsocket] Which TWSocketServer event to capture data sent?

2006-11-21 Thread Arno Garrels
Clay Shannon wrote: >> >> "ESocketException - Error 10048 in function Bind Address already in >> use." Another socket is already listening on the same IP and port. --- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html -- To unsubscribe or change your settings for TWSock

Re: [twsocket] Which TWSocketServer event to capture data sent?

2006-11-21 Thread Francois Piette
> If I add this line of code (from TcpSrv1.pas): > > PostMessage(Handle, WM_APPSTARTUP, 0, 0); > > To the FormShow() event, I get this error msg: > > "ESocketException - Error 10048 in function Bind Address already in use." Error 10048 occurs when you try to make a socket listening on a port alr

Re: [twsocket] Which TWSocketServer event to capture data sent?

2006-11-21 Thread Wilfried Mestdagh
Hello Clay, > Maybe a typo error ?>> > No, all that code was copied-and-pasted from TCPSrv1.pas. Maybe you cast the wrong object ? In a TWSocketSErver event, the Sender argument is TWSocketServer, the Client argument is your clientclass. In the events of the datasockets the Sender argument is you

Re: [twsocket] Which TWSocketServer event to capture data sent?

2006-11-21 Thread Clay Shannon
half Of Francois Piette Sent: Tuesday, November 21, 2006 1:52 AM To: ICS support mailing Subject: Re: [twsocket] Which TWSocketServer event to capture data sent? > << See TTcpSrvForm.WSocketServer1ClientConnect in TcpSrv1.pas source.>> > > When I try to use that cod