473,803 Members | 2,599 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

long delay sending via tcpip socket in .NET

Hi,
I have a connection which after an initial handshake has one way traffic.
I am sending bursty data. When I write a data buffer (variable size) the
last portion of it is not sent to the server until I start writing the next
buffer which may be 1/2/10/20/30 seconds later. Im using NetworkStream which
says it's unbuffered and Flush() is a no op. When I know I may not be sending
more data for a while how can I ensure that my data is flushed immediately?
The connection can not be closed (server constraint).
thanks,
-john

Aug 3 '05 #1
2 2330
hi john. sorry but this isnt a solution to your problem. i was wondering if
you had solved this problem or found a work around? i have been all over the
place finding a way to fix this with my program and you are the first person
to mention the same exact problem im going through.

"John Lemire" wrote:
Hi,
I have a connection which after an initial handshake has one way traffic.
I am sending bursty data. When I write a data buffer (variable size) the
last portion of it is not sent to the server until I start writing the next
buffer which may be 1/2/10/20/30 seconds later. Im using NetworkStream which
says it's unbuffered and Flush() is a no op. When I know I may not be sending
more data for a while how can I ensure that my data is flushed immediately?
The connection can not be closed (server constraint).
thanks,
-john

Oct 26 '05 #2
No unfortunately I didnt get any responses and I had to back burner this as
it was a startup time only problem and I had bigger issues to move on to. It
still take me 6-8 seconds to go through my little backand forth handshake
protocol before my comms are open for business. Maybe someday I'll get a
change to re-investigate this. Good luck and post if you figure it out in
the mean time :-)

"Kelly Morphis" wrote:
hi john. sorry but this isnt a solution to your problem. i was wondering if
you had solved this problem or found a work around? i have been all over the
place finding a way to fix this with my program and you are the first person
to mention the same exact problem im going through.

"John Lemire" wrote:
Hi,
I have a connection which after an initial handshake has one way traffic.
I am sending bursty data. When I write a data buffer (variable size) the
last portion of it is not sent to the server until I start writing the next
buffer which may be 1/2/10/20/30 seconds later. Im using NetworkStream which
says it's unbuffered and Flush() is a no op. When I know I may not be sending
more data for a while how can I ensure that my data is flushed immediately?
The connection can not be closed (server constraint).
thanks,
-john

Oct 27 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
2164
by: Brian Roberts | last post by:
I have a command line Python program that sometimes takes a bit (several minutes) to run. I want to provide an optional method for an impatient user (me!) to check the status of the program. The type and amount of status information doesn't fit nicely into a --verbose or logger -- either too little or too much information at different points. I think an optional web page would be convenient interface. The Python program would listen...
0
1416
by: Tom Stepka | last post by:
Problem: We are experiencing an excessive (i.e. 16 - 20 seconds) delay when attempting to establish socket connection over the network, using the TcpLister.AcceptSocket() and TcpClient.Connect(ipAddress, Port) calls. It seems that the delay is between client.Connect() and listener.Accept(). We never have a delay when we use a telnet client to connect to the server. And we do not have a delay on all networks, just on some. The code we...
2
257
by: John Lemire | last post by:
Hi, I have a connection which after an initial handshake has one way traffic. I am sending bursty data. When I write a data buffer (variable size) the last portion of it is not sent to the server until I start writing the next buffer which may be 1/2/10/20/30 seconds later. Im using NetworkStream which says it's unbuffered and Flush() is a no op. When I know I may not be sending more data for a while how can I ensure that my data is...
18
2211
by: Larry Herbinaux | last post by:
I'm having issues with garbage collection with my long-standing service process. If you could review and point me in the right direction it would be of great help. If there are any helpful documents that you could point me to help me control the GC, then that would be great also. The .Net GC does not cleanup memory of our service process unless it is forced to by another process that hogs memory. · GC Algorithm - This is an issue...
3
4202
by: TulasiKumar | last post by:
hi all, My requirment is i want to listen one perticular TCPIP port for one IPAddress,Wheneverver the data in coming to this port that data i will be save one text file..For example:www.msdn.microsoft.com is fixed with some TCPIP port.Whene ever data is coming in to the TCPIP that data i will be saved one text file.I have done the code regrading my requirement.Whenever i have started my listner class it was giving one exception ,the...
1
2732
by: CKane | last post by:
i am trying to build a "missed message" queue on a C# TCP server. many of the devices connecting are mobile and may drop out in bad signal areas. i want to store any messages missed for when they reconnect. so far....it takes activity on the client end to initialize the close. isnt there a check when the server sends a socket.send to a client that has lost connection? it takes a few minutes for the exception to get hit, and i am losing...
1
6385
by: Jay | last post by:
I have a client app sending messages over the socket on a certain port. In the client app: I do this for every message I need to send: 1. Create a socket and connect. 2. Send message 3. Close socket. The Listener requires that the client keep the socket connected while sending messages..which is every 20-30 seconds. My question is: Can I keep the connection open for the whole day? Connect
2
5892
by: beachdog | last post by:
I have built a web service consumer application by adding a web reference for a vendor-provided wsdl file. My client is interoperating with the server just fine, in terms of sending a request and receiving and properly parsing a response, but the problem is that when I step through it in the debugger (or even when I run the executable) there is a delay of about 15 seconds after executing my XXXAsync method to invoke the web service until...
9
1786
by: =?Utf-8?B?U2hhdW5P?= | last post by:
I have a TCPIP socket providing data to my app. My app works on messages (not textual) with a predefined footer (eg 0x01 followed by 0x02) How should i go about buffering this and retrieving the complete messages ? Current approach: I have a byte array of eg 1MB to hold data until full messages are assembled when socket is readable, i read all data into the buffer starting at the pos after the last byte of data that was put into it...
0
9699
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9562
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10542
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10068
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9119
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7600
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6840
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4274
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2968
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.