in reply to Socket: Specifying client port to connect from

What I'm wondering is, if there is any way to specify what local port the client should be using when making a connection to the server?

Yes. Just include the LocalPort parameter when you call IO::Socket::INET->new().

It works as advertised. It is usually used when listening, but it does the right thing when initiating a connection as well.

-sauoq
"My two cents aren't worth a dime.";
  • Comment on Re: Socket: Specifying client port to connect from

Replies are listed 'Best First'.
Re: Re: Socket: Specifying client port to connect from
by Ordinary_User (Beadle) on Oct 21, 2003 at 11:31 UTC
    It works just fine!

    Many thanks for your help!

    "May the forces of high bandwidth be with you."