Click here to Skip to main content
15,894,896 members
Home / Discussions / C#
   

C#

 
GeneralRe: c urgent Pin
Keith Barrow2-May-11 3:48
professionalKeith Barrow2-May-11 3:48 
JokeRe: c urgent Pin
Thomas Krojer2-May-11 4:40
Thomas Krojer2-May-11 4:40 
GeneralRe: c urgent Pin
walterhevedeich2-May-11 16:32
professionalwalterhevedeich2-May-11 16:32 
Questionvideo codes c# Pin
naalgo1-May-11 22:50
naalgo1-May-11 22:50 
AnswerRe: video codes c# Pin
Richard MacCutchan1-May-11 23:16
mveRichard MacCutchan1-May-11 23:16 
AnswerRe: video codes c# Pin
Eddy Vluggen1-May-11 23:24
professionalEddy Vluggen1-May-11 23:24 
GeneralRe: video codes c# Pin
Keith Barrow2-May-11 0:46
professionalKeith Barrow2-May-11 0:46 
GeneralRe: video codes c# Pin
Thomas Krojer2-May-11 4:42
Thomas Krojer2-May-11 4:42 
GeneralRe: video codes c# Pin
Eddy Vluggen2-May-11 5:02
professionalEddy Vluggen2-May-11 5:02 
AnswerGimme codez Pin
Luc Pattyn1-May-11 23:36
sitebuilderLuc Pattyn1-May-11 23:36 
AnswerRe: video codes c# Pin
I Believe In GOD1-May-11 23:40
I Believe In GOD1-May-11 23:40 
JokeRe: video codes c# Pin
V.2-May-11 1:39
professionalV.2-May-11 1:39 
AnswerRe: video codes c# Pin
Pete O'Hanlon2-May-11 5:59
mvePete O'Hanlon2-May-11 5:59 
QuestionHow to save un Serialize Component Pin
Anubhava Dimri1-May-11 22:43
Anubhava Dimri1-May-11 22:43 
AnswerRe: How to save un Serialize Component Pin
Richard MacCutchan1-May-11 23:14
mveRichard MacCutchan1-May-11 23:14 
AnswerRe: How to save un Serialize Component Pin
BobJanova3-May-11 1:28
BobJanova3-May-11 1:28 
GeneralRe: How to save un Serialize Component Pin
Anubhava Dimri3-May-11 18:09
Anubhava Dimri3-May-11 18:09 
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.

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.