I forgot about the IP address in Bind.  That makes great sense.

Thanks for the help.


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Alex
Gilev
Sent: Thursday, May 03, 2007 5:53 PM
To: Ararat Synapse
Subject: Re: [Synalist] Two networks cards


Hello Jon,

You must have Bind procedure in your TCP server code. This procedure 
exactly to specify which interface will listening on.
E.g. to listen all interfaces:
bind('0.0.0.0', Port)
To listen only one interface:
bind('192.168.192.1', Port)

Full description of Bind command from synapse sources :) :

     Connects socket to local IP address and PORT. IP address may be 
numeric or
     symbolic ('192.168.74.50', 'cosi.nekde.cz', 'ff08::1'). The same 
for PORT
     - it may be number or mnemonic port ('23', 'telnet').

     If port value is '0', system chooses itself and conects unused port 
in the
     range 1024 to 4096 (this depending by operating system!). Structure
     LocalSin is filled after calling this method.

     Note: If you call this on non-created socket, then socket is created
     automaticly.

     Warning: when you call : Bind('0.0.0.0','0'); then is nothing done! 
In this
     case is used implicit system bind instead.

--
With best regards,
Alex Gilev,
http://www.xstarter.com

Jon Bertrand wrote:
> Question for all you smart network people:
>
> If a PC has two network interfaces and I write a TCP server which interface 
> is it listening on?
>
> How do I control which one to listen on?
>   


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public

Reply via email to