Hi All,
I am writing a small client/server program. I have a peculiar
requirement that the client program while sending the data to the
server has to send the data from the user defined port. But the thing
what i have observed is that the client binds to some random ephemeral
port before sending the data. I could not find any option that i can
set for the client program to bind to port to some predefined value.
The kernel always picks from the set of random ports.
I would like to know, if there is any option, so that i can mandate
the client program to send the data through a predefined port. As
there is a option in listen() for server, to listen on a particular
predefined port.
Thanks,
Regards,
Madhur
|