Keep connection alive

I am writing a client and server, similiar to the samples provided with VC++ 5. I don't want my server to have any dialogs, windows, etc. I just want it to listen for a connection, make the connection to the client, and receive messages. So far i have been able to write the code to listen and accept a connection. But once the connection is made the server program ends. how do i keep the server running?
GreatOneAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
_Scotch_Connect With a Mentor Commented:
Just reviewing old questions... You asked how to make a dialog
invisible...

You can do this with ShowWindow(FALSE) but then you can never
get it back unless somewhere in your code you have ShowWindow(TRUE)...

You can also just iconify yourself with ShowWindow(SW_MINIMIZE)
0
 
nil_dibCommented:
Do you instance a thread for each incoming connection?
0
 
GreatOneAuthor Commented:
Im not sure if i instanced a thread. how would i check? and i only want the server to accept one connection, for now. does that make a difference?
0
 
nil_dibCommented:
I think you should post the code snippet where the server accepts the connection  .....
0
 
GreatOneAuthor Commented:
I have figured out part of my problem. I wrote my server using a dialog-based application wizard. The program listens for a connection when the dialog box appears. SO is there anyway to make the dialog box invisible?

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.