Article View: borland.public.cppbuilder.internet.socket
Article #5479Re: How To Send To Multiple Clients
From: mike
Date: Tue, 10 Aug 2004 14:52
Date: Tue, 10 Aug 2004 14:52
38 lines
2340 bytes
2340 bytes
Remy, Thanks for answering, but I was being really stupid. On the receiving end of the broadcast I was closing the socket. It was test code from long ago that I had forgotten about. I knew it was something stupid and it did not make sense to me at all, then I found the test code and went "DAh". Again thanks. Mike "Remy Lebeau (TeamB)" <gambit47.no.spam@no.spam.yahoo.com> wrote in message news:41169ab1$1@newsgroups.borland.com... > > "mike" <mfbrowne@earthlink.net> wrote in message > news:41166225$1@newsgroups.borland.com... > > > what happens is shortly after the actual socket send takes > > place the socket is dropped. There is no exception or > > error that I can see, it just simply drops. > > Please show your actual sending code. Sockets don't just drop without > saying why, so there has to be an error being reported somewhere.. > > > So my question is, in a threaded server socket, what is the > > proper way to send a message to all connected clients. > > Exactly what you are already doing - looping through the server's > connections sending to each one. Although I have to question your use of > InfoToSendToAllClients. What happens if a thread has not sent > InfoToSendToAllClients yet when another multi-client message comes through? > Is InfoToSendToAllClients overwritten? Sounds like you need to implement > some kind of queing system, if you are not already doing so. > > > Gambit > >
Technical Details
Message-ID:
<4118e326@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<41166225$1@newsgroups.borland.com> <41169ab1$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,14632bcd79989ffc X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "mike" <mfbrowne@earthlink.net> Newsgroups: borland.public.cppbuilder.internet.socket References: <41166225$1@newsgroups.borland.com> <41169ab1$1@newsgroups.borland.com> Subject: Re: How To Send To Multiple Clients Date: Tue, 10 Aug 2004 10:52:57 -0400 Lines: 40 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.190.196 Message-ID: <4118e326@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1092150054 68.204.190.196 (10 Aug 2004 08:00:54 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail