🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Forcing Transmission of Packets

#5716
From: Remy Lebeau (TeamB)
Date: Mon, 12 Jul 2004 16:42
29 lines
1857 bytes
"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: <40f2bf6a$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <40eee74d$1@newsgroups.borland.com> <40ef26e6$1@newsgroups.borland.com> <40f28573@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
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <40eee74d$1@newsgroups.borland.com> <40ef26e6$1@newsgroups.borland.com> <40f28573@newsgroups.borland.com>
Subject: Re: Forcing Transmission of Packets
Date: Mon, 12 Jul 2004 09:42:56 -0700
Lines: 31
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: <40f2bf6a$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1089650538 68.69.17.41 (12 Jul 2004 09:42:18 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail