Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Jun : Dynamically instantiating TServerSocket
| Subject: | Dynamically instantiating TServerSocket |
| Posted by: | "RandomAccess" (n..@tellingyou.com) |
| Date: | Fri, 29 Jun 2007 23:40:48 |
The following code compiles,
and I can trace through it,
but when fsrv.Active is set to true
the OnListen event is not fired.
Also, my client test app can't connect.
"...actively refused connection..."
If on the otherhand, I simply drop a TServerSocket
component onto my form, it works fine.
Any ideas?
fSrv := TServerSocket.Create(nil);
fSrv.ServerType := stThreadBlocking;
fSrv.Port := jdc_Port;
fSrv.OnAccept := SrvAccept;
fSrv.OnClientConnect := SrvClientConnect;
fSrv.OnClientDisconnect := SrvClientDisconnect;
fSrv.OnClientError := SrvClientError;
fSrv.OnClientRead := SrvClientRead;
fSrv.OnClientWrite := SrvClientWrite;
fSrv.OnListen := SrvListen;
fSrv.Active := true;
Any help would be appreciated