Hello,
here's my OnSessionAvailable.
I use TWSocket insteat of TWSocketServer because it already works and I
don't want to change that part of my program.
procedure TServerSocket.MyOnSessionAvailable(Sender: TObject;
ErrCode: Word);
var news:TSocket; begin
if not assigned(asoc) then
begin
try
{ We need to accept the client connection }
NewS := self.Accept;
{ And then associate this connection with our client socket }
asoc:=TAnswerSocket.Create(callback, OnClose);
asoc.Dup(news);
except
On e:exception do
begin
// log a message
end;
end;
end;
end;
Greetings
Markus
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be