🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: TServerSocket sends a unwanted acknowlege

#3382
From: Remy Lebeau (TeamB)
Date: Wed, 21 Sep 2005 16:52
26 lines
1668 bytes
"Billy Holliday" <NoSpam@Hohoho.com> wrote in message
news:433113a8$1@newsgroups.borland.com...

> How and where to set the TCP_NODELAY option.
>
> Is the OnClientConnect event the right place?

That is fine.

>     setsockopt(Socket, IPPROTO_TCP, TCP_NODELAY, &fl, sizeof(fl));
<snip>
> but the complier says: can't convert TCustomWinSocket to int!!

Correct, because you are passing the wrong thing to setsockopt().

> in winsock.h the first parameter is a type SOCKET, so i think
> Socket is right....

No, it is not.  You need to use its SocketHandle property instead:

    setsockopt((SOCKET)Socket->SocketHandle, IPPROTO_TCP, TCP_NODELAY, &fl,
sizeof(fl));


Gambit
Technical Details
Message-ID: <43318fa3@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <433101e8@newsgroups.borland.com> <43310420$1@newsgroups.borland.com> <433113a8$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,2e35895317a3987d
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <433101e8@newsgroups.borland.com> <43310420$1@newsgroups.borland.com> <433113a8$1@newsgroups.borland.com>
Subject: Re: TServerSocket sends a unwanted acknowlege
Date: Wed, 21 Sep 2005 09:52:31 -0700
Lines: 28
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: <43318fa3@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1127321507 68.69.17.41 (21 Sep 2005 09:51:47 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail