Click here to Skip to main content
15,886,919 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to save un Serialize Component Pin
BobJanova4-May-11 7:51
BobJanova4-May-11 7:51 
QuestionEntire Url Redirect/Encryption Pin
rakesh46571-May-11 18:20
rakesh46571-May-11 18:20 
AnswerRe: Entire Url Redirect/Encryption Pin
Pete O'Hanlon1-May-11 19:34
mvePete O'Hanlon1-May-11 19:34 
QuestionSocket is suddenly closed Pin
Haim Nachum1-May-11 11:52
Haim Nachum1-May-11 11:52 
AnswerRe: Socket is suddenly closed Pin
Peter_in_27801-May-11 13:27
professionalPeter_in_27801-May-11 13:27 
AnswerRe: Socket is suddenly closed Pin
jschell2-May-11 7:47
jschell2-May-11 7:47 
AnswerRe: Socket is suddenly closed Pin
BobJanova3-May-11 1:31
BobJanova3-May-11 1:31 
GeneralRe: Socket is suddenly closed Pin
jschell3-May-11 8:29
jschell3-May-11 8:29 
BobJanova wrote:
TCP operates a timeout if no packets are sent for some time, because this is
usually a sign that the connection has been lost.


TCP does not do that.

BobJanova wrote:
you want to maintain a connection despite no user interaction, you need to send
'keep-alive' packets or 'pings' every few seconds (one every 20s should be
enough) to keep the connection open


You do that because the server or firewall requires it - not TCP.

BobJanova wrote:
However, remember that if you do this, idle connections will never time
out and you can run out of server sockets if too many people leave your app
open, so you then should have some client code that logs out and closes the
socket after a longer inactive time (30 mins or so).


That of course is an architecture problem. If you server is going to respect keep-alives then it must exist in an enterprise that doesn't expect an unlimited number of client all with persistent connections.

One alternative to that possibility is to close even connections that are in use after a given time period. Or require a connect/message/close protocol like http.
GeneralRe: Socket is suddenly closed Pin
BobJanova3-May-11 9:16
BobJanova3-May-11 9:16 
GeneralRe: Socket is suddenly closed Pin
jschell4-May-11 8:13
jschell4-May-11 8:13 
GeneralRe: Socket is suddenly closed Pin
toploader3-May-11 10:17
toploader3-May-11 10:17 
GeneralRe: Socket is suddenly closed Pin
BobJanova3-May-11 10:36
BobJanova3-May-11 10:36 
GeneralRe: Socket is suddenly closed Pin
toploader3-May-11 11:59
toploader3-May-11 11:59 
QuestionFile being used by another process? I don't think so! Pin
SimpleData1-May-11 8:52
SimpleData1-May-11 8:52 
AnswerRe: File being used by another process? I don't think so! Pin
Luc Pattyn1-May-11 9:04
sitebuilderLuc Pattyn1-May-11 9:04 
GeneralRe: File being used by another process? I don't think so! Pin
SimpleData1-May-11 9:10
SimpleData1-May-11 9:10 
GeneralRe: File being used by another process? I don't think so! Pin
DaveyM691-May-11 9:16
professionalDaveyM691-May-11 9:16 
GeneralRe: File being used by another process? I don't think so! Pin
SimpleData1-May-11 9:22
SimpleData1-May-11 9:22 
AnswerRe: File being used by another process? I don't think so! Pin
Luc Pattyn1-May-11 9:21
sitebuilderLuc Pattyn1-May-11 9:21 
GeneralRe: File being used by another process? I don't think so! Pin
SimpleData1-May-11 9:25
SimpleData1-May-11 9:25 
AnswerRe: File being used by another process? I don't think so! Pin
Luc Pattyn1-May-11 9:52
sitebuilderLuc Pattyn1-May-11 9:52 
GeneralRe: File being used by another process? I don't think so! Pin
lukeer1-May-11 21:22
lukeer1-May-11 21:22 
AnswerRe: File being used by another process? I don't think so! Pin
I Believe In GOD1-May-11 9:12
I Believe In GOD1-May-11 9:12 
AnswerRe: File being used by another process? I don't think so! Pin
BobJanova3-May-11 1:33
BobJanova3-May-11 1:33 
Questionsaving values in forms of c# Pin
aeman1-May-11 2:03
aeman1-May-11 2:03 

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.