🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #4635

Re: Blocking Socket Help

#4635
From: mike
Date: Sun, 09 Jan 2005 00:13
46 lines
2856 bytes
Thank you both for answering the information was most helpful.

I did consider sending a message to the clients to stop attempting to
reconnect but I was looking for another way because if the server side is
closed then it is because trouble is being experienced on the net and I just
want to shut it down and then bring it up again and let all clients connect
again.

I have also detected that a client can thing it is still connected but in
reality is not. Have no clue where the connection goes but just seems to go
quite. When this happens the server side also does not detect the loss of
the connection for whatever reason. So by sending a message to the client at
shut down it may never get there.

Anyway, I have adjusted to close the socket at the server side and it
appears to work as Remy indicated. I will get a chance next week to try it
in the real life environment to see if it works. I sure hope so.

Anyway, thanks again for the information and hopefully it all works.

Mike


"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message
news:41def727$1@newsgroups.borland.com...
>
> "Bob Gonder" <notbg@notmindspring.invalid> wrote in message
> news:e8rtt0hpur3uhbmfu9aocea2u76lr1qqvd@4ax.com...
>
> > Could you have the server send a "shutdown" message to
> > the clients so they would cease trying to reconnect?
>
> I had considered mentioning that earlier, but did not.  Under ideal
> conditions, when everything is managed properly, such a packet is not
> actually needed.
>
> > Will this code actually close all connections?
>
> The connections are not removed from the list until they are physically
> freed from memory.  Whether that happens immediately or not depends on
> whether the server is being used in blocking or non-blocking mode.
>
>
> Gambit
>
>
Technical Details
Message-ID: <41e0881e$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!lnewsoutpeer01.lnd.ops.eu.uu.net!lnewsinpeer00.lnd.ops.eu.uu.net!emea.uu.net!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <41deb491$1@newsgroups.borland.com> <e8rtt0hpur3uhbmfu9aocea2u76lr1qqvd@4ax.com> <41def727$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,b1c5fb84bd800066
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "mike" <mfbrowne@earthlink.net>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <41deb491$1@newsgroups.borland.com> <e8rtt0hpur3uhbmfu9aocea2u76lr1qqvd@4ax.com> <41def727$1@newsgroups.borland.com>
Subject: Re: Blocking Socket Help
Date: Sat, 8 Jan 2005 19:13:52 -0500
Lines: 48
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 68.204.189.169
Message-ID: <41e0881e$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1105233950 68.204.189.169 (8 Jan 2005 17:25:50 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!lnewsoutpeer01.lnd.ops.eu.uu.net!lnewsinpeer00.lnd.ops.eu.uu.net!emea.uu.net!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail