Article View: borland.public.cppbuilder.internet.socket
Article #5475Re: How To Send To Multiple Clients
From: Remy Lebeau (TeamB)
Date: Sun, 08 Aug 2004 21:27
Date: Sun, 08 Aug 2004 21:27
23 lines
1833 bytes
1833 bytes
"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:
<41169ab1$1@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>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,14632bcd79989ffc X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <41166225$1@newsgroups.borland.com> Subject: Re: How To Send To Multiple Clients Date: Sun, 8 Aug 2004 14:27:50 -0700 Lines: 25 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <41169ab1$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1092000433 68.69.17.41 (8 Aug 2004 14:27:13 -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