Click here to Skip to main content
15,916,378 members
Home / Discussions / C#
   

C#

 
GeneralRe: Cleaning a Stream Pin
Alex Getman11-May-04 7:05
Alex Getman11-May-04 7:05 
GeneralRe: Cleaning a Stream Pin
Snowjim11-May-04 7:08
Snowjim11-May-04 7:08 
GeneralRe: Cleaning a Stream Pin
Heath Stewart11-May-04 7:12
protectorHeath Stewart11-May-04 7:12 
GeneralRe: Cleaning a Stream Pin
Heath Stewart11-May-04 7:15
protectorHeath Stewart11-May-04 7:15 
GeneralRe: Cleaning a Stream Pin
Snowjim11-May-04 7:50
Snowjim11-May-04 7:50 
GeneralRe: Cleaning a Stream Pin
Heath Stewart11-May-04 8:51
protectorHeath Stewart11-May-04 8:51 
GeneralRe: Cleaning a Stream Pin
Snowjim11-May-04 9:06
Snowjim11-May-04 9:06 
GeneralRe: Cleaning a Stream Pin
Heath Stewart11-May-04 9:15
protectorHeath Stewart11-May-04 9:15 
Normally you could call Stream.SetLength, but the NetworkStream (and casting it won't change the stream Type) always throw a NotSupportedException.

Thinking there'd be fragments doesn't make sense, however. The stream is streamed between the client and server. When you read or write, it always starts with the current cursor location and advanced the amount that you read or write. Everything else is "forgotten".

What you should try is writing a client that will simply buffer what the server sends and writes the content to a log file, as well as makes it available for your application. This wouldn't be a bad idea to leave in the product, either. By "throwing on a switch" (as some applications - including games - have) you could debug communication with the server.

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: Cleaning a Stream Pin
Snowjim11-May-04 9:39
Snowjim11-May-04 9:39 
GeneralFramework 1.0 vs Framework 1.1 Pin
Alex Getman11-May-04 5:27
Alex Getman11-May-04 5:27 
GeneralRe: Framework 1.0 vs Framework 1.1 Pin
Dave Kreskowiak11-May-04 6:13
mveDave Kreskowiak11-May-04 6:13 
GeneralRe: Framework 1.0 vs Framework 1.1 Pin
Alex Getman11-May-04 6:27
Alex Getman11-May-04 6:27 
GeneralRe: Framework 1.0 vs Framework 1.1 Pin
Heath Stewart11-May-04 6:44
protectorHeath Stewart11-May-04 6:44 
GeneralFile preview in windows explorer Pin
pedery11-May-04 5:21
pedery11-May-04 5:21 
GeneralRe: File preview in windows explorer Pin
Heath Stewart11-May-04 7:08
protectorHeath Stewart11-May-04 7:08 
GeneralRe: File preview in windows explorer Pin
pedery19-May-04 6:03
pedery19-May-04 6:03 
GeneralRe: File preview in windows explorer Pin
Heath Stewart19-May-04 6:15
protectorHeath Stewart19-May-04 6:15 
GeneralWindows form Usercontrol hosted in IE Pin
Tim Kohler11-May-04 5:20
Tim Kohler11-May-04 5:20 
GeneralRe: Windows form Usercontrol hosted in IE Pin
Heath Stewart11-May-04 6:50
protectorHeath Stewart11-May-04 6:50 
GeneralRe: Windows form Usercontrol hosted in IE Pin
Tim Kohler11-May-04 8:40
Tim Kohler11-May-04 8:40 
GeneralRe: Windows form Usercontrol hosted in IE Pin
Heath Stewart11-May-04 8:45
protectorHeath Stewart11-May-04 8:45 
GeneralRe: Windows form Usercontrol hosted in IE Pin
Tim Kohler12-May-04 3:10
Tim Kohler12-May-04 3:10 
GeneralRe: Windows form Usercontrol hosted in IE Pin
Heath Stewart12-May-04 3:52
protectorHeath Stewart12-May-04 3:52 
GeneralRe: Windows form Usercontrol hosted in IE Pin
Tim Kohler12-May-04 4:00
Tim Kohler12-May-04 4:00 
GeneralRe: Windows form Usercontrol hosted in IE Pin
Heath Stewart12-May-04 4:29
protectorHeath Stewart12-May-04 4:29 

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.