Sease, Darin E. wrote:
> Hi.
> 
> TSrvForm = class(TForm)
>  SrvSocket: TWSocket;
>  ...
> 
> Why does this code work:
> 
> SrvSocket.Close;
> SrvSocket.Addr  := '0.0.0.0';
> SrvSocket.Port  := PortEdit.Text;
> SrvSocket.Proto := 'tcp';
> SrvSocket.Listen;
> 
> SrvSocket.Close;
> SrvSocket.Addr  := '0.0.0.0';
> SrvSocket.Port  := 'telnet';
> SrvSocket.Proto := 'tcp';
> SrvSocket.Listen;
> 
> But not this:
> 
> SrvSocket.Close;
> SrvSocket.Addr  := '0.0.0.0';
> SrvSocket.Port  := 'telnet';
> SrvSocket.Proto := 'tcp';
> SrvSocket.Listen;
> 
> SrvSocket.Close;
> SrvSocket.Listen; // Invalid argument (#10022 in listen: Port not
> assigned)
> 
> Port not assigned?
> What is going on?

That is 'as designed', you have to (re)set some basic properties before
the call to Listen.

--
Arno Garrels
  
 
> 
> 
> Darin Sease
> Building Systems Analyst
> Syracuse City School District
> PH: 315 435 4292
> E: [EMAIL PROTECTED]
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to