Click here to Skip to main content
15,891,567 members
Home / Discussions / C#
   

C#

 
GeneralRe: how make to quaver a window form? Pin
Sasuko22-May-05 2:07
Sasuko22-May-05 2:07 
GeneralCreate a textbox with background transparent Pin
Sasuko21-May-05 23:38
Sasuko21-May-05 23:38 
GeneralAn Ambitioous Console Replication Pin
amitmohanty21-May-05 18:16
amitmohanty21-May-05 18:16 
GeneralRe: An Ambitioous Console Replication Pin
Christian Graus22-May-05 16:08
protectorChristian Graus22-May-05 16:08 
GeneralRe: An Ambitioous Console Replication Pin
amitmohanty22-May-05 18:03
amitmohanty22-May-05 18:03 
GeneralRe: An Ambitioous Console Replication Pin
Christian Graus22-May-05 19:23
protectorChristian Graus22-May-05 19:23 
GeneralNetworkStream and TCPClient problem.. Please help Pin
jbergetun21-May-05 15:02
jbergetun21-May-05 15:02 
GeneralRe: NetworkStream and TCPClient problem.. Please help Pin
Marc Clifton21-May-05 15:18
mvaMarc Clifton21-May-05 15:18 
I'm surprised it even works it all.

The problem is, while "DataAvailable" is up to the vagueries of the server and the connection. If the server hasn't sent any data when you get to this point in the code, then there won't be any data available.

Even worse, if you try this over a real internet connection, packet delays, TCP/IP error recovery, etc., will delay your data in a completely random manner, so you can never rely on DataAvailable.

Pretty much, you need to put this code in a thread and the server should send some indication of how many lines the client should be expecting.

Hope that helps.

Marc

My website
GeneralRe: NetworkStream and TCPClient problem.. Please help Pin
jbergetun22-May-05 0:38
jbergetun22-May-05 0:38 
GeneralRe: NetworkStream and TCPClient problem.. Please help Pin
Marc Clifton22-May-05 1:37
mvaMarc Clifton22-May-05 1:37 
GeneralCannot convert from stream to DirectX Audio Pin
Anthony Mushrow21-May-05 14:10
professionalAnthony Mushrow21-May-05 14:10 
GeneralC# Code to find the average of prime numbers between 1-100 Pin
diabolusgorgon21-May-05 14:06
diabolusgorgon21-May-05 14:06 
GeneralRe: C# Code to find the average of prime numbers between 1-100 Pin
diabolusgorgon21-May-05 15:03
diabolusgorgon21-May-05 15:03 
GeneralRe: C# Code to find the average of prime numbers between 1-100 Pin
Marc Clifton21-May-05 15:24
mvaMarc Clifton21-May-05 15:24 
GeneralRe: C# Code to find the average of prime numbers between 1-100 Pin
Robert Rohde21-May-05 20:43
Robert Rohde21-May-05 20:43 
GeneralNetworks questions Pin
felopater21-May-05 12:38
felopater21-May-05 12:38 
QuestionIs C# for engineers? Pin
amitmohanty21-May-05 12:32
amitmohanty21-May-05 12:32 
AnswerRe: Is C# for engineers? Pin
Colin Angus Mackay21-May-05 12:45
Colin Angus Mackay21-May-05 12:45 
GeneralRe: Is C# for engineers? Pin
amitmohanty21-May-05 13:13
amitmohanty21-May-05 13:13 
GeneralRe: Is C# for engineers? Pin
Colin Angus Mackay21-May-05 13:16
Colin Angus Mackay21-May-05 13:16 
GeneralRe: Is C# for engineers? Pin
amitmohanty21-May-05 13:30
amitmohanty21-May-05 13:30 
GeneralRe: Is C# for engineers? Pin
eggie521-May-05 14:39
eggie521-May-05 14:39 
GeneralRe: Is C# for engineers? Pin
amitmohanty21-May-05 14:44
amitmohanty21-May-05 14:44 
GeneralRe: Is C# for engineers? Pin
ekynox21-May-05 15:18
ekynox21-May-05 15:18 
GeneralBuilding option get hidden!!! :O Pin
amitmohanty21-May-05 8:55
amitmohanty21-May-05 8:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.