Click here to Skip to main content
15,913,487 members
Home / Discussions / C#
   

C#

 
AnswerRe: Socket.ReceiveTimeOut Problem Pin
Programm3r9-Dec-09 0:22
Programm3r9-Dec-09 0:22 
GeneralRe: Socket.ReceiveTimeOut Problem Pin
lnmca9-Dec-09 0:27
lnmca9-Dec-09 0:27 
GeneralRe: Socket.ReceiveTimeOut Problem Pin
Programm3r9-Dec-09 0:44
Programm3r9-Dec-09 0:44 
GeneralRe: Socket.ReceiveTimeOut Problem Pin
lnmca9-Dec-09 0:57
lnmca9-Dec-09 0:57 
GeneralRe: Socket.ReceiveTimeOut Problem Pin
Programm3r9-Dec-09 1:10
Programm3r9-Dec-09 1:10 
GeneralRe: Socket.ReceiveTimeOut Problem Pin
lnmca9-Dec-09 1:14
lnmca9-Dec-09 1:14 
GeneralRe: Socket.ReceiveTimeOut Problem Pin
Programm3r9-Dec-09 1:21
Programm3r9-Dec-09 1:21 
AnswerRe: Socket.ReceiveTimeOut Problem Pin
Paulo Zemek9-Dec-09 2:31
Paulo Zemek9-Dec-09 2:31 
Well, I think you can't do that.
Imagine the situation:

Server starts reading.
Client starts sending. But, for some reason, the connection is VERY slow.
Server then receives the time-out (imagine it does not disconnect).
The server then asks for more data... but, the client is still sending the old-data. So, the server must now wait for what? The old data? The new data? How will it differentiate one data from the other?

I think the fact the connection is closed is on purpose. If you want, I think you may NOT use the ReceiveTimeOut. Instead, create another thread to call "abort" in the reading thread if it takes too long, so the connection will not be aborted, but I don't really know what will happen with the data in this case.

Also, depending on your requirements, it's possible to use UDP to receive the data.
Questionerror in 'if' Pin
Muhammad Bilal Saleem Barkati8-Dec-09 23:33
Muhammad Bilal Saleem Barkati8-Dec-09 23:33 
AnswerRe: error in 'if' Pin
N a v a n e e t h8-Dec-09 23:42
N a v a n e e t h8-Dec-09 23:42 
AnswerRe: error in 'if' Pin
Luc Pattyn8-Dec-09 23:47
sitebuilderLuc Pattyn8-Dec-09 23:47 
GeneralRe: error in 'if' Pin
N a v a n e e t h8-Dec-09 23:56
N a v a n e e t h8-Dec-09 23:56 
AnswerRe: error in 'if' Pin
Keith Barrow8-Dec-09 23:59
professionalKeith Barrow8-Dec-09 23:59 
QuestionDeployment Question ..! Pin
CoderOnline8-Dec-09 23:08
CoderOnline8-Dec-09 23:08 
QuestionInsert MenuItem when opening child form Pin
thungphan8-Dec-09 21:32
thungphan8-Dec-09 21:32 
Questionproblem when connect to sql server Pin
mjawadkhatri8-Dec-09 21:16
mjawadkhatri8-Dec-09 21:16 
AnswerRe: problem when connect to sql server Pin
Calla8-Dec-09 21:53
Calla8-Dec-09 21:53 
AnswerRe: problem when connect to sql server Pin
puri keemti8-Dec-09 22:14
puri keemti8-Dec-09 22:14 
QuestionHow to display notifier for c# console application? Pin
AhmedMasum8-Dec-09 21:09
AhmedMasum8-Dec-09 21:09 
AnswerMessage Closed Pin
8-Dec-09 21:13
stancrm8-Dec-09 21:13 
GeneralRe: How to display notifier for c# console application? Pin
AhmedMasum9-Dec-09 0:46
AhmedMasum9-Dec-09 0:46 
AnswerRe: How to display notifier for c# console application? Pin
Luc Pattyn8-Dec-09 23:48
sitebuilderLuc Pattyn8-Dec-09 23:48 
GeneralRe: How to display notifier for c# console application? Pin
AhmedMasum9-Dec-09 0:59
AhmedMasum9-Dec-09 0:59 
GeneralRe: How to display notifier for c# console application? Pin
AhmedMasum14-Dec-09 21:49
AhmedMasum14-Dec-09 21:49 
QuestionRSA-SHA1 Pin
satsumatable8-Dec-09 20:20
satsumatable8-Dec-09 20:20 

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.