Hello Francois,

I wanted to test this with the UdpLstn1 demo.
I assigned local IP to property Addr, there's no error on
the call to Listen, and GetXAddr returns correct local IP.
But OnDataAvailable doesn't trigger anymore, if I set Addr
back to '0.0.0.0' OnDataAvailable triggers again.

Arno


Francois Piette wrote:
>> PS: Sorry for posting 2nd time, but I never got any response in my email
>> :S 
> 
> I replyed to your last email telling to test with GetXAddr which returns
> local IP address to which a socket has been bound. I'm not sure it will
> not return 0.0.0.0. If it does, then you have to use a separate TWSocket
> for each of your interface, assigning Addr to the IP of the given
> interface.  
> 
> --
> [EMAIL PROTECTED]
> http://www.overbyte.be
> 
> 
> ----- Original Message -----
> From: "George" <[EMAIL PROTECTED]>
> To: <twsocket@elists.org>
> Sent: Monday, February 20, 2006 10:20 AM
> Subject: [twsocket] UDPServer receive and IP
> 
> 
>> Hello,
>> 
>> I have a UDPServer component and on DataAvailable
>> 
>>   SrcLen := SizeOf(Src);
>>   Len    := UDPServer.ReceiveFrom(@Buffer, SizeOf(Buffer), Src, SrcLen);
>> 
>> ShowMessage(inet_ntoa(Src.sin_addr)); // i know the IP address of the
>> remote pc 
>> 
>> but since my computer contains 5 ip addresses in the interface, Im
>> receiving the same UDP message 5 times. How can I know what is the IP
>> Address of the local machine that is being read data? I tried
>> UDPServer.Addr and LocalAddr but it always returns 0.0.0.0 
>> 
>> UDPServer.PeerAddr crashes my program. I mean it never executes it.
>> 
>> PS: Sorry for posting 2nd time, but I never got any response in my email
>> :S 
>> 
>> Thanks
>> 
>> 
>> --
>> To unsubscribe or change your settings for TWSocket mailing list
>> please goto http://www.elists.org/mailman/listinfo/twsocket
>> Visit our website at http://www.overbyte.be
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to