473,383 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Determining if data is available on a stream

Hello HG,

I'm using anonymous pipes for ipc between multiple processes. The
pipes are created with win32-functions since there is no support for
pipes in the dotnet-framework. To access the pipe I create FileStream-
objects from the pipe-handles.

Reading and writing through those streams works fine. However, I need
to know if data is avaliable on a pipe/stream since a call to Read()
is blocking. Is there anyway to detect if theres data available on a
FileStream. Or is there another Stream-Type i could wrap around the
pipes which supports this function? Any help would be highly
appreciated!

Cheers
Henning

Jul 11 '07 #1
1 1311
In case anyone cares: The Win-32-Function PeekNamedPipe works with
anonymous pipes too and does the job.

Jul 12 '07 #2

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

Similar topics

14
by: John J. Hughes II | last post by:
Using the below code I am send multiple sterilized object across an IP port. This works fine if only one object is received at a time but with packing sometimes there is more then one object or...
6
by: Ryan | last post by:
Hi, I am confused with how NetworkStream works. My application needs to handle heavy requests sent through TCP socket connection. I use NetworkStream.Read method to get the stream...
3
by: Sarah | last post by:
I would like my vb.net software running on an independent system be able to read the data going from a proprietary system to a dot-matrix printer. Few questions - are there any commercially...
13
by: Randy | last post by:
Is there any way to do this? I've tried tellg() followed by seekg(), inserting the stream buffer to an ostringstream (ala os << is.rdbuf()), read(), and having no luck. The problem is, all of...
0
by: sonu | last post by:
I have following client side code which i have used in my asp.net project SummaryFeatured Resources from the IBM Business Values Solution Center WHITEPAPER : CRM Done Right Improve the...
1
by: Lee Crabtree | last post by:
Is there some way to find out if a stream is already open? In particular, I want to be able to switch from a NetworkStream to a FileStream depending on input. I know I can use a Stream object and...
1
by: romiko2000 | last post by:
Hi Folks, I got a weird problem, I create an XMLWriter to post a document via the webrequest stream and after running a network trace, I notice the data is prefixed with 3 invalid characters! ...
0
by: Hannibal111111 | last post by:
I found this code on a site for doing string encryption/decryption. The string will encrypt fine, but I get this error when I try to decrypt. Any idea why? I posted the code below. The error...
3
by: kjell | last post by:
Hi, I'm trying to write a program that reads data from a network stream. I would like the program to read all available data in the buffer and then process the data. I do not want the program...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.