Article View: borland.public.cppbuilder.nativeapi
Article #15986Re: WSA????
From: Tharun Pillay
Date: Tue, 03 Jun 2003 15:06
Date: Tue, 03 Jun 2003 15:06
36 lines
2196 bytes
2196 bytes
Hans, I cannot close the socket when SendBuf returns because it is a non-blocking server. Ie, winsock will spool until it believes it's safe to send over that socket. -1 only tells you that Winsock couldn't queue it (try again later). If I close before anything is sent over the socket, I will... basically send nothing. Does winsock let you play with or even see what's in the buffer? Tharun. "Hans Galema" <j.m.galema.dontusethis@maartens.nl> wrote in message news:3edc7f28@newsgroups.borland.com... > Tharun Pillay wrote: > > TServerSocket->Socket->Send in a blocking server would (as I understand > > things) return only once its completly sent all data - how then, in a > > non-blocking server, do I know when the TServerSocket->Socket->Send has sent > > all the bytes queued? > > There is no TServerSocket->Socket->Send() but there is > TServerSocket->Socket->Connections[connectionnr]->SendBuf() or ..->SendText(). > > > Reason being, I need to close the socket from the > > server side when all data has finished sending. > > Using ..->SendBuf() if it does not return -1 you can close the TServerSocket > right away I would think. This will close all other connections too. Are there > more connections ? > > Hans. > >
Technical Details
Message-ID:
<3edcb8aa@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3edc7a5c@newsgroups.borland.com> <3edc7f28@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,30c81141f30ce678 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-06-03 08:08:10 PST From: "Tharun Pillay" <tharun@webmail.co.za> Newsgroups: borland.public.cppbuilder.nativeapi References: <3edc7a5c@newsgroups.borland.com> <3edc7f28@newsgroups.borland.com> Subject: Re: WSA???? Date: Tue, 3 Jun 2003 17:06:23 +0200 Lines: 38 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 196.15.202.200 Message-ID: <3edcb8aa@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1054652586 196.15.202.200 (3 Jun 2003 08:03:06 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail