Article View: borland.public.cppbuilder.internet.socket
Article #5718Re: Forcing Transmission of Packets
From: Joe St. Onge
Date: Mon, 12 Jul 2004 20:50
Date: Mon, 12 Jul 2004 20:50
43 lines
2258 bytes
2258 bytes
Remy, Thank you!! Works great, for my application forcing parameters has doubled the system throughput... Best Regards, Joe "Remy Lebeau (TeamB)" <gambit47.no.spam@no.spam.yahoo.com> wrote in message news:40f2bf6a$1@newsgroups.borland.com... > > "Joe St. Onge" <jstonge@nel-techlabs.com> wrote in message > news:40f28573@newsgroups.borland.com... > > > if (setsockopt(MainForm->DigiLANClientSocket->Socket, > > IPPROTO_TCP,TCP_NODELAY,(char*)&bOptVal,bOptLen) != SOCKET_ERROR) > > That should be this instead: > > // important - use BOOL instead of bool > BOOL bOptVal = TRUE; > int bOptLen = sizeof(BOOL); > > if( > setsockopt((SOCKET)MainForm->DigiLANClientSocket->Socket->SocketHandle, > IPPROTO_TCP, TCP_NODELAY,(char*)&bOptVal, bOptLen) == SOCKET_ERROR) > > > MainForm->DigiLANClientSocket->Active = false; > > You need to activate the socket first before you can set any options for it. > > > [C++ Error] CallBackConfirm.cpp(28): E2034 Cannot > > convert 'TClientWinSocket * const' to 'unsigned int' > > You need to use the Socket's SocketHandle property, not the Socket pointer > itself. > > > Gambit > >
Technical Details
Message-ID:
<40f2f9ab$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<40eee74d$1@newsgroups.borland.com> <40ef26e6$1@newsgroups.borland.com> <40f28573@newsgroups.borland.com> <40f2bf6a$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,a9487aba9f7a346f X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Joe St. Onge" <jstonge@nel-techlabs.com> From: "Joe St. Onge" <jstonge@nel-techlabs.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <40eee74d$1@newsgroups.borland.com> <40ef26e6$1@newsgroups.borland.com> <40f28573@newsgroups.borland.com> <40f2bf6a$1@newsgroups.borland.com> Subject: Re: Forcing Transmission of Packets Date: Mon, 12 Jul 2004 16:50:57 -0400 Lines: 45 Organization: Nel-Tech Labs 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: 216.41.126.194 Message-ID: <40f2f9ab$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1089665451 216.41.126.194 (12 Jul 2004 13:50:51 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail