Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

TCp/IP Nagle problem

Posted on 2003-11-07
7
Medium Priority
?
361 Views
Last Modified: 2013-11-13
I have an application that usues Tcp/Ip to communicate...the host sends very frequent time depenedant staus messages to the ckient.. like every 20 milliseconds...I cant slow them down... however i hit the nagle problem of the small packets being combined.. that screws up the timing aspect! How can i within Vb abdnd the winsock ocx, turn off nagling!!!!!



0
Comment
Question by:Hotbread
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 5

Expert Comment

by:fantasy1001
ID: 9700071
As far as I know, you need to set SetSockOption API to WSQ_SOCK_OPTION.WSQ_TCP_NODELAY.
This must be done per every connection.
0
 
LVL 1

Expert Comment

by:DeuceEE
ID: 9700798
I had such problem and I had a workaround (not sure of any communcation settings, this is just a simple code).

At the end of every packet you send, send a unique character or two of yours -- some programs actually append Chr$(2) & Chr$(4) at the end.
On the other side, receive the packet and split it using the flag you created.

Assume you want to send "Hello" followed by "World!", and they were sent instantly that it became like this: "HelloWorld!". Using the flag, they will become "Hello24World!24" (I used the numbers 2 and 4 to represent Chr$(2) and Chr$(4)). At every occurance of the 24 flag, that is a packet.


My suggestion is very simple that I just noticed it's a 500-point question, I'm sure that wasn't what you were looking for, but I'm putting it for others who might find it helpful for related issues.
0
 

Author Comment

by:Hotbread
ID: 9701073
Thanks guys;... fraid I tried that DeuceEE BUT I need a packet every 20th of a sec to syncronise... so its not just the actual data BUT the time they arrive... fantasy... how can I do that with vanilla VB and using the winsock ocx control is it possible?
0
 
LVL 5

Expert Comment

by:fantasy1001
ID: 9711699
I am not sure of it. I used to have this problem long time ago with winsock also. One of our programming expert suggests that we use the api SetSockOption and set it to WSQ_SOCK_OPTION.WSQ_TCP_NODELAY. I donn't have pretty much info on it anyway.

0
 

Accepted Solution

by:
amp072397 earned 0 total points
ID: 10528617
PAQed - no points refunded (of 500)

amp
Community Support Moderator amp~at~experts-exchange.com
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question