Solved

TCp/IP Nagle problem

Posted on 2003-11-07
7
305 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
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
VBA open file from excel cell 4 34
array6 challenfge 6 65
countHi2 challenge 7 44
Macro Excel - Multiple If conditions 2 16
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 how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now