Networking Forums

Networking Forums > Computer Networking > Linux Networking > Specifying Send Port for client

Reply
Thread Tools Display Modes

Specifying Send Port for client

 
 
Madhur
Guest
Posts: n/a

 
      03-15-2007, 03:21 AM
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

 
Reply With Quote
 
 
 
 
Damian 'legion' Szuberski
Guest
Posts: n/a

 
      03-15-2007, 08:47 AM
On 2007-03-15, Madhur wrote:
> 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.

bind() and connect() afterwards.

--
Damian Szuberski
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help, can not send mail via my router, I think port setting simho3000@gmail.com Wireless Internet 2 05-01-2007 03:59 PM
Cannot send emails from client pc Blair Windows Networking 0 06-23-2004 05:16 AM
how to send a message from an NT Server to any given client on a LAN/WAN Mario Windows Networking 5 03-05-2004 10:49 AM
how to send a message from an NT Server to any given client on a LAN/WAN Mario Windows Networking 0 03-04-2004 05:05 PM
Do I need port forwarding on 25 port to send messages? bu Linux Networking 4 07-17-2003 02:42 PM



1 2 3 4 5 6 7 8 9 10 11