473,769 Members | 1,632 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Network Stream Read Timeout = -1?

Does anyone know what a -1 means as a Network stream read timeout?

Console.WriteLi ne("Timeout= {0}", stream.ReadTime out)

returns a -1

Thanks

Al G


Oct 12 '07 #1
3 4542
"Al G" <ag*******@nosp am.charter.nets chrieb
Does anyone know what a -1 means as a Network stream read timeout?

Console.WriteLi ne("Timeout= {0}", stream.ReadTime out)

returns a -1
Usually putting the cursor on ReadTimeout and pressing [F1] shows context
sensitiv help. :-)

It says: "The default value, Infinite, specifies that the read operation
does not time out."

Infinite is -1.
Armin

Oct 12 '07 #2

"Armin Zingler" <az*******@free net.dewrote in message
news:%2******** ********@TK2MSF TNGP06.phx.gbl. ..
"Al G" <ag*******@nosp am.charter.nets chrieb
>Does anyone know what a -1 means as a Network stream read timeout?

Console.WriteL ine("Timeout= {0}", stream.ReadTime out)

returns a -1

Usually putting the cursor on ReadTimeout and pressing [F1] shows context
sensitiv help. :-)

It says: "The default value, Infinite, specifies that the read operation
does not time out."

Infinite is -1.
Armin
Thanks Armin, I used the help, but didn't find where it actually said
Infinite is -1.

Al G

Oct 12 '07 #3
"Al G" <ag*******@nosp am.charter.nets chrieb
>
"Armin Zingler" <az*******@free net.dewrote in message
news:%2******** ********@TK2MSF TNGP06.phx.gbl. ..
"Al G" <ag*******@nosp am.charter.nets chrieb
Does anyone know what a -1 means as a Network stream read
timeout?
>
Console.WriteLi ne("Timeout= {0}", stream.ReadTime out)
>
returns a -1
Usually putting the cursor on ReadTimeout and pressing [F1] shows
context sensitiv help. :-)

It says: "The default value, Infinite, specifies that the read
operation does not time out."

Infinite is -1.
Armin

Thanks Armin, I used the help, but didn't find where it actually
said Infinite is -1.
Alt+F12 (symbol search): Infinite <enter>
Armin
Oct 13 '07 #4

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

Similar topics

6
7358
by: Yechezkal Gutfreund | last post by:
I have been using the following code (successfully) to read Xml formated text packets from a TCP stream. The output from the server stream consists of a sequence of well formed Xml documents written to the output stream. We are willing to pay $ to any expert (e.g. MVP) consultant who has to time to help us track down this problem. (we will discuss rates if you can prove your expertise, and problem solving approach).
8
17339
by: Scott | last post by:
Hi guys, If I try to call read(), readline(), readtoend() and there is nothing to read (from a never ending loop for example) the program seems to continue but it exits the loop for no apparent reason. We also can't check the stream for the length, as the network stream doesn't support seek operations
7
3154
by: simonrigby_uk | last post by:
Hi all, Sorry if this is the incorrect group but I couldn't see anything directly relevant. Can someone confirm for me what happens when two network streams are sent to an application at the same time. My scenario is a small server application that listens on a particular TCP port. I am sending streams of data to it via a client app. Inside
3
11776
by: carmelo8 | last post by:
Hi there, I want to timeout Read method of System.Stream class after 30 secs. of no activity given a certain opened connection. That is, because some incoming connections to my application just don't give any signal and my Read method keeps waiting from the socket for some data to be read eternally. I have seen that in framework 2.0 System.Stream.Read has a new property that will probably match with what I need called 'ReadTimeout'....
3
6774
by: Sir Psycho | last post by:
Hi, For some reason, when i step over this code, it returns the full byte stream im expecting from the server, however when I let it run with no intervention, it only seems to grab a small chunk on the stream. What am I doing wrong? There is more code than this, but this is the problem code.
0
2888
by: vishnu | last post by:
Hi, Am trying to post the data over https and am getting error in httpwebresponse.getResponseStream.Please help me to get rid of this issue. Here is the message from immediate window ?myResp.GetResponseStream() {System.Net.ConnectStream}
1
20643
by: Ryan Liu | last post by:
Hi, I have a 100 clients/ one server application, use ugly one thread pre client approach. And both side user sync I/O. I frequently see the error on server side(client side code is same, but I don't see the error): "System.IO.IOException: Unable to read data from the transport connection:A blocking operation was interrupted by a call to WSACancelBlockingCall"
10
19368
by: =?Utf-8?B?SnVhbg==?= | last post by:
Hi! I want to use ASP to download big files using ADODB.STREAM. It works very fine with files smaller than 80 MB. On the Webserver I can see that memory allocation and the process w3wp is running. After some time (more or less 2 minutes) I get a response timeout. Here is the code:
2
3243
by: =?Utf-8?B?VHJlY2l1cw==?= | last post by:
Hello, Newsgroupians: In regards to reading a stream, I know we use the Read() method. One could implement reading a stream using a while-loop. while (stream.Read(buffer, 0, buffer.Length) != 0) { // Process the buffer }
0
9589
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
10211
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
10045
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9863
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
8870
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
7408
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
6673
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();...
0
5298
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3561
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.