Computing.Net > Forums > Programming > C++ socket server

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

C++ socket server

Reply to Message Icon

Name: ian
Date: November 14, 2002 at 21:07:42 Pacific
OS: linux/win32
CPU/Ram: any
Comment:

listening for TCP and UDP connection on the same port...

how do you do this?



Sponsored Link
Ads by Google

Response Number 1
Name: Guy
Date: November 15, 2002 at 10:52:49 Pacific
Reply:

Hi - If I understand the question ......

You code both servers in the normal way.

However, each server needs to be a separately executed program, or if this is not desired, then each 'server' needs to run as a separate process (fork()).

Ditto for any (local) clients.

Write a little code and experiment with this, it is very easy to do, there are bunches of examples for server/client code available on the net.

The experiments I ran were all on Linux. I don't know how a Win TCP/IP stack will handle this sort of requirement.

HTH, Guy


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: C++ socket server

how to send data client(c++) to server(c#) www.computing.net/answers/programming/how-to-send-data-clientc-to-serverc/20139.html

C socket programming www.computing.net/answers/programming/c-socket-programming/308.html

Sending files using C Sockets HELP! www.computing.net/answers/programming/sending-files-using-c-sockets-help/11474.html