Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TCP Sockets in MFC Application

Status
Not open for further replies.

sweep123

Technical User
May 1, 2003
185
GB
I have been trying for several days to get a Server/Client TCP sockets working.

I created a test Server (simple MFC application) to test my Client. But during the period of trying to get it working I created a test Client(again a simple MFC application).

Never got them working! (Test Server and Client)

But with a Console based test Server application and my Client (using a worker thread for the TCP side) it worked.

Can I assume that TCP Server/Client would never work as simple single threaded MFC applications.
 
>> Can I assume that TCP Server/Client would never work as
>> simple single threaded MFC applications.

That would be an invalid assumption.

-pete


-pete
I just can't seem to get back my IntelliSense
 
OK, is there anything special you need to do with MFC applications when using sockets; i.e. have the recv/send in worker threads.

Or does the MFC environment need or impose special actions.
 
You can do a socket server in a single thread using blocking sockets. This of course would mean you could only handle a single connection at a time.

Nothing special is required in MFC to use sockets of any type in any way. There are MFC socket classes and a Initialization function that you can use but they are not required just because you have an MFC application.


-pete
I just can't seem to get back my IntelliSense
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top