Solved

Keep connection alive

Posted on 1999-01-12
5
195 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
  • 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
xyBalance chalenge 58 96
iSeries DB2 Query 2 97
fizzArray  challenge 1 94
I could not set window to top 4 20
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

808 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