03-15-07 06:25 AM
On Mar 15, 12:24 pm, "Madhur" <madhurr...@gmail.com> wrote:
> 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.
>
What is your 'bind' mean, it means the system do the binding for you
or you explicitly call bind() before you send the data?
If you do not call bind(), do it.
> 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
[ Post a follow-up to this message ]
|