This is a discussion on 1 port, listening and connecting, how to within the Linux Networking forums, part of the Linux Forums category; Hi, I am implementing a client using TCP/IP and Berkeley sockets. I would like to have one port to ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
Marcia Hon <honm@rogers.com> 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 cameron.kerr@paradise.net.nz : http://nzgeeks.org/cameron/ Empowered by Perl! |