Networking Forums

Networking Forums > Computer Networking > Linux Networking > 1 port, listening and connecting, how to

Reply
Thread Tools Display Modes

1 port, listening and connecting, how to

 
 
Marcia Hon
Guest
Posts: n/a

 
      02-10-2004, 01:46 AM
Hi,

I am implementing a client using TCP/IP and Berkeley sockets. I would like
to have one port to connect to the server AND listen to incoming
connections. I don't know how to do this.

Would I have to use threads, forks? Is there a way to do this without
threads, forks?

Thank you so much for your help.

Marcia Hon


 
Reply With Quote
 
 
 
 
Cameron Kerr
Guest
Posts: n/a

 
      02-10-2004, 08:55 AM
Marcia Hon <(E-Mail Removed)> wrote:
> Hi,
>
> I am implementing a client using TCP/IP and Berkeley sockets. I would like
> to have one port to connect to the server AND listen to incoming
> connections. I don't know how to do this.


Using select(2). fork(2) would also be a solution, depending on what you
wanted to do.

Search for 'beej' on Google and hit the first link.

And then go out and by 'UNIX Network Programming', by Stevens.

--
Cameron Kerr
(E-Mail Removed) : http://nzgeeks.org/cameron/
Empowered by Perl!
 
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
Port Not Listening Thomas R Grassi Jr Windows Networking 4 12-13-2008 09:17 AM
Socket connection to port fails despite port open / listening ! Jack Linux Networking 2 12-19-2007 03:46 PM
Changing Default VPN listening/connecting port =?Utf-8?B?YmlsbGlubnk=?= Broadband Hardware 0 04-04-2005 02:09 PM
Two Services Listening on Same Port Buck Turgidson Linux Networking 1 03-07-2005 02:37 PM
Two Services Listening on Same Port Buck Turgidson Linux Networking 13 03-06-2005 01:23 PM



1 2 3 4 5 6 7 8 9 10 11