 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
ug Guest
|
Posted: Thu Apr 22, 2004 7:57 pm Post subject: Specifying Client IP Address with Indy |
|
|
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 |
|
 |
|
|
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
|
|