Is there a way to bind or connect your program to local network interface? lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- Awesome Programmer · 2013-12-23 20:49 Say I have a program that needs to connect to a specific network interface. For instance, lets just say I have a two different Network Card - A = 192.168.1.33 and B = 192.168.1.44. I only want my program or application to be able to communicate through NIC B. How do you do that on Lazarus? Any help or hints will be greatly appreciated. Thank you and happy holidays to you all. bye, ---------------------------------------------------------------------- jarto · 2013-12-24 08:58 Sure, that can be done but which socket library are you using? Indy? Synapse? Something else? In Synapse it goes a bit like this: var LSocket: TTCPBlockSocket; ... LSocket:=TTCPBlockSocket.Create; LSocket.CreateSocket; LSocket.Bind(IpAddressToListenFor,Port); ---------------------------------------------------------------------- Awesome Programmer · 2013-12-24 14:23 Is Synaser same as Synapse? If not where do I download it from. My Synaser file only has TBlockSerial Class. ---------------------------------------------------------------------- BigChimp · 2013-12-24 14:32 1 You answered your own question 2 Do you know we have a wiki? wiki.lazarus.freepascal.org/synapse ---------------------------------------------------------------------- Awesome Programmer · 2015-03-12 13:10 Can I do the same with lNet component (TLTComponent)? ---------------------------------------------------------------------- engkin · 2015-03-12 15:53 Quote from: reltek on March 12, 2015, 02:10:00 pmCan I do the same with lNet component (TLTComponent)? Let's see! For instance: Quote.. unit lNet; ...   TLSocket = class(TLHandle) ...     function Listen(const APort: Word; const AIntf: string = LADDR_ANY): Boolean; ... and notice that following the string LADDR_ANY - using: Ctrl+Click - would lead you to: Code: [Select]  LADDR_ANY   = lCommon.LADDR_ANY; doing the same, again: Code: [Select]  LADDR_ANY = '0.0.0.0'; What do you think?