Async sockets
-
Hi. Im building a web chat application and im using async sockets in the server-side. The client connects to the server socket via flash component. My question is , when does the connection dies? if i close my browser i see that the server is closing the connection. is that because TCP socket sends data every x seconds to check the connection? and if it does , can i rely on it? or should i use UDP socket and try to handle the connection state myself. Thank you.
-
Hi. Im building a web chat application and im using async sockets in the server-side. The client connects to the server socket via flash component. My question is , when does the connection dies? if i close my browser i see that the server is closing the connection. is that because TCP socket sends data every x seconds to check the connection? and if it does , can i rely on it? or should i use UDP socket and try to handle the connection state myself. Thank you.
-
Hi. Im building a web chat application and im using async sockets in the server-side. The client connects to the server socket via flash component. My question is , when does the connection dies? if i close my browser i see that the server is closing the connection. is that because TCP socket sends data every x seconds to check the connection? and if it does , can i rely on it? or should i use UDP socket and try to handle the connection state myself. Thank you.
TCP sockets are by definition reliable. UDP sockets on the other hand are not. As stated above, the browser is closing the connection explicitly.
-
TCP uses an explicit RST (reset) message to close a connection. The connection can also die due to a timeout.
Where is the timeout for the connection set?
-
Where is the timeout for the connection set?