Solved

Keep connection alive

Posted on 1999-01-12
5
199 Views
Last Modified: 2013-11-20
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?
0
Comment
Question by:GreatOne
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 4

Expert Comment

by:nil_dib
ID: 1327584
Do you instance a thread for each incoming connection?
0
 

Author Comment

by:GreatOne
ID: 1327585
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
 
LVL 4

Expert Comment

by:nil_dib
ID: 1327586
I think you should post the code snippet where the server accepts the connection  .....
0
 

Author Comment

by:GreatOne
ID: 1327587
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
 
LVL 3

Accepted Solution

by:
_Scotch_ earned 70 total points
ID: 1327588
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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question