473,396 Members | 2,026 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,396 software developers and data experts.

checking if TcpClient received data

Is there an event which could notify me when a TcpClient has something
to read? Or do I just have to do
while (!networkStream.DataAvailable) Thread.Sleep(50);

--
"Now the storm has passed over me
I'm left to drift on a dead calm sea
And watch her forever through the cracks in the beams
Nailed across the doorways of the bedrooms of my dreams"
Nov 24 '06 #1
1 1882

Hi,

What about:
TcpClient.Clisent.Poll(0,SelectMode.SelectRead);

??

"Nikola Skoric" <ni*******@net4u.hrwrote in message
news:MP************************@news.t-com.hr...
Is there an event which could notify me when a TcpClient has something
to read? Or do I just have to do
while (!networkStream.DataAvailable) Thread.Sleep(50);

--
"Now the storm has passed over me
I'm left to drift on a dead calm sea
And watch her forever through the cracks in the beams
Nailed across the doorways of the bedrooms of my dreams"

Nov 24 '06 #2

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

Similar topics

2
by: Theo | last post by:
Hi, I am using a tcpclient and a tcplistener to send and receive packets. The client sends a packet and the listener replies with another one. I can send 2 packets and get an answer from the...
3
by: מורדי | last post by:
Hi, I'm writing a client/server application in which the client send a series of screenshots to the server to be saved using the tcpclient. in most cases the first screenshot is transmitted ok...
5
by: Greg Martz | last post by:
I'd like to do the following in C# and prefer using tcpclient rather than raw sockets... Connect to a unix box Login run date +%H%M%S retrieve the response. That's it, nothing more. This...
3
by: Ricardo Quintanilla | last post by:
i had a problem whom i do not know how to explain. i was using a TcpClient (System.Net.Sockets.TcpClient) object to send and receive data to an AS400 socket. Two months ago it started to work...
1
by: Frank | last post by:
I wonder if anyone could give me a suggestion on how to best handle this scenario. I wish to have an aspx page contact a server and receive messages. Initially, a login messge is sent, then...
1
by: Frank | last post by:
I wonder if anyone could give me a suggestion on how to best handle this scenario. I wish to have an aspx page contact a server and receive messages. Initially, a login messge is sent, then...
2
by: Jck | last post by:
Could someone tell me how to detect TcpClient connection dropped, please? I have a TcpClient connected to a server by IP and Port. The TcpClient only read data from the server. However, if there...
1
by: WildBill | last post by:
I am using a tcpclient and a network stream to communicate with the TCP port on a printer for testing the printer firmware. The code I have works perfectly the first time I run it. The printer...
4
by: Veeraraghavan | last post by:
Hi All, I am developing a client server communication using system.net.socket and I am finding it very difficult to get a solution for this. I started with single port communication with single...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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,...

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.