C Board  

Go Back   C Board > General Programming Boards > Networking/Device Communication

Reply
 
LinkBack Thread Tools Display Modes
Old 10-13-2008, 01:37 PM   #1
Protocol Test Engineer
 
ssharish2005's Avatar
 
Join Date: Sep 2005
Location: fseek(UK)
Posts: 1,324
Sockets

Is the there any way of letting the clients know that the server process has been halted, in case the server was aborted on the other end?

thanks.

ssharish
__________________
Life is like riding a bicycle. To keep your balance you must keep moving - Einstein
ssharish2005 is offline   Reply With Quote
Old 10-13-2008, 03:10 PM   #2
and the hat of Jobseeking
 
Salem's Avatar
 
Join Date: Aug 2001
Location: The edge of the known universe
Posts: 21,650
If the server exits, won't all the connections close?
__________________
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.

Salem is offline   Reply With Quote
Old 10-13-2008, 04:44 PM   #3
Banned
 
master5001's Avatar
 
Join Date: Aug 2001
Location: Visalia, CA, USA
Posts: 3,699
What is your objective? To have your program gracefully acknowledge a server closing? (I.e. you are writing a game and want the clients to be able to reconnect if Billy's dog starts to chew on his Cat-5 cable between his modem and router?)
master5001 is offline   Reply With Quote
Old 10-13-2008, 10:48 PM   #4
Protocol Test Engineer
 
ssharish2005's Avatar
 
Join Date: Sep 2005
Location: fseek(UK)
Posts: 1,324
I am sorry; I should have made it a bit clearer. I think problem wouldn't be there if it was implemented in C.

My server has been implemented in prolog! What happened when the server aborts is that, it closed all the open ports by the server. Or at least it closed down all the port when it restarts and re-opens it back again! But the stream which were opened doesn’t close, the clients are still reading from those open stream. If I manage to close the stream on the server end and when the client reads it from the closed stream it should return -1, which then I could catch that and close the stream on the client end. And make a new connection.

ssharish
__________________
Life is like riding a bicycle. To keep your balance you must keep moving - Einstein
ssharish2005 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Best way to poll sockets? 39ster Networking/Device Communication 3 07-22-2008 01:43 PM
Cross platform sockets zacs7 Networking/Device Communication 5 06-27-2007 05:16 AM
multiple UDP sockets with select() nkhambal Networking/Device Communication 2 01-17-2006 07:36 PM
Raw Sockets and SP2... Devil Panther Networking/Device Communication 11 08-12-2005 04:52 AM
Starting window sockets _Cl0wn_ Windows Programming 2 01-20-2003 11:49 AM


All times are GMT -6. The time now is 12:00 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22