HighTechTalks DotNet Forums  

NetworkStream read throws socketexception timedout and closes s

Dotnet Distributed Applications microsoft.public.dotnet.distributed_apps


Discuss NetworkStream read throws socketexception timedout and closes s in the Dotnet Distributed Applications forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Geir Sanne
 
Posts: n/a

Default NetworkStream read throws socketexception timedout and closes s - 01-29-2007 , 08:46 AM






hi!!!

im using tcp/ip and networkstream to read messages from a socket.
the problem is that if the sender uses to long time i get an ioexception
with innerexception socketexception timedout and the socket is closed.

is it a way to just get a timeout message and keep the socket open ?

Reply With Quote
  #2  
Old   
Bryan Phillips
 
Posts: n/a

Default Re: NetworkStream read throws socketexception timedout and closes s - 03-03-2007 , 08:04 AM






How about trapping the socket exception and reopening the socket?

--
Bryan Phillips
MCSD, MCDBA, MCSE
Blog: http://bphillips76.spaces.live.com



"Geir Sanne" <GeirSanne (AT) discussions (DOT) microsoft.com> wrote


Quote:
hi!!!

im using tcp/ip and networkstream to read messages from a socket.
the problem is that if the sender uses to long time i get an ioexception
with innerexception socketexception timedout and the socket is closed.

is it a way to just get a timeout message and keep the socket open ?


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.