BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Specifying Client IP Address with Indy

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock
View previous topic :: View next topic  
Author Message
ug
Guest





PostPosted: Thu Apr 22, 2004 7:57 pm    Post subject: Specifying Client IP Address with Indy Reply with quote



I tried the solution for IdUDPClient (or better with IdSNMPClient).

I assigned the 'second' IP address of the computer to SNMPClient.Binding.IP
but the request is sent out with the 'primary' address. Is there s.th. I'm
missing?

The second IP address is assigned to the interface, and works well with TCP
clients.

This is the code:
SNMPClient.Host := ServerIP;
SNMPClient.Port := ServerPort;
SNMPClient.Binding.IP := ClientIP;
SNMPClient.ReceiveTimeout := timeout;
SNMPClient.QuickSend(MIB_String, Community_String, ServerIP,
Receive_String);

Uli




"Remy Lebeau (TeamB)" <gambit47.no.spam (AT) no (DOT) spam.yahoo.com> schrieb im
Newsbeitrag news:4071b35c$1 (AT) newsgroups (DOT) borland.com...
Quote:

"ug" <ugarbe (AT) vt4 (DOT) net> wrote in message
news:406dc0f0 (AT) newsgroups (DOT) borland.com...

Is it possible to specify the IP address a client (TIdUDPClient,
TIdTCPClient) uses when sending/receiving data?

Yes. Look at the BoundIP property in TIdTCPClient, and the Binding.IP
property in TIdUDPClient.

the client binds automatically to the primary IP address
of LAN adapter (IP stack).

Only when you don't specify your own binding info prior to opening the
connection.


Gambit






Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.