I have a mahine that has two nic cards in it that sit on two different LANs. I am trying to send upd messages to one
of the LANs but not the other. I am using the following code fragment to create the socket.
$self->{udpSocket} =
IO::Socket::INET->new( Proto => 'udp',
PeerAddr => $self->{Address},
PeerPort => $self->{Port},
LocalAddr=> $self->{Bind},
);
where $self->{Bind} is the nic that I wish to send the upd message on. What I am see when i send data on the socket is not what I want. It appears that the send is leaving on the last card listed by ipconfig, which is not the card I want.
I have even tried
$self->{udpSocket}->bind( $self->{Bind} ) after creating the socket without any luck.
I am using perl 5.6.1 build630 from Activestate on a Windows 2000 machine.
Thank you for any help
of the LANs but not the other. I am using the following code fragment to create the socket.
$self->{udpSocket} =
IO::Socket::INET->new( Proto => 'udp',
PeerAddr => $self->{Address},
PeerPort => $self->{Port},
LocalAddr=> $self->{Bind},
);
where $self->{Bind} is the nic that I wish to send the upd message on. What I am see when i send data on the socket is not what I want. It appears that the send is leaving on the last card listed by ipconfig, which is not the card I want.
I have even tried
$self->{udpSocket}->bind( $self->{Bind} ) after creating the socket without any luck.
I am using perl 5.6.1 build630 from Activestate on a Windows 2000 machine.
Thank you for any help