🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: sendto to same destination more times after eachother fails.?

#3933
From: Bob Gonder
Date: Wed, 04 May 2005 16:30
35 lines
2820 bytes
longshot wrote:

>Are you sure there is no way to force the packets to be send separately?

I use WinSock commands (not Indy), and found that the following code
made my c/s sessions go quicker as the server sends (usually) small
packets and sometimes waits for a response from the client.
Without this, there seemed to be a delay as the socket waited for more
data to make a worthy-sized transmission packet. So the server would
be waiting for it's socket to timeout and send, and then the
round-trip delay....it all added up to a slow user experiance.

/* one of these works, don't know yet which */
setsockopt(ClientOutSocket,SOL_SOCKET,TCP_NODELAY,(char*)&t,sizeof(t));
setsockopt(ClientOutSocket,IPPROTO_TCP,TCP_NODELAY,(char*)&t,sizeof(t));

>It really would save me a lot of work 

As Remy said: No, it wouldn't.
You still need to recreate received packets correctly.
The only thing this would get you is better response time.

>and also i don't like my packets to
>stick together when there is lag and have this strange behaviour.

Then you could impliment full duplex communication where the server
waits for an acknowledgment from the client for every packet. But
then, you would need to add some sort of timeout so the server doesn't
lock up on a lost packet.

>Also i am building a server app, that means lots of communication, thus
>Sleep(200); 's are extremely unwanted.

If each client has it's own server thread, then that should not be a
concern.
Technical Details
Message-ID: <50th71db9qmpnog2gldkeqvsfv112h3ano@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!txtfeed1.tudelft.nl!130.161.131.117.MISMATCH!tudelft.nl!txtfeed2.tudelft.nl!newsfeed.multikabel.nl!news2.euro.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4272a30c@newsgroups.borland.com> <4272bde4$1@newsgroups.borland.com> <42745e0d@newsgroups.borland.com> <427472e1$3@newsgroups.borland.com> <427798d4$3@newsgroups.borland.com> <4277be4a$3@newsgroups.borland.com> <42783193$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,56c67ad4148993cd
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: Re: sendto to same destination more times after eachother fails.?
Date: Wed, 04 May 2005 09:30:15 -0700
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <50th71db9qmpnog2gldkeqvsfv112h3ano@4ax.com>
References: <4272a30c@newsgroups.borland.com> <4272bde4$1@newsgroups.borland.com> <42745e0d@newsgroups.borland.com> <427472e1$3@newsgroups.borland.com> <427798d4$3@newsgroups.borland.com> <4277be4a$3@newsgroups.borland.com> <42783193$1@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 67.77.155.246
X-Trace: newsgroups.borland.com 1115224212 67.77.155.246 (4 May 2005 09:30:12 -0700)
Lines: 39
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!txtfeed1.tudelft.nl!130.161.131.117.MISMATCH!tudelft.nl!txtfeed2.tudelft.nl!newsfeed.multikabel.nl!news2.euro.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail