How many socket connections can a web server handle?

In short: You should be able to achieve in the order of millions of simultaneous active TCP connections and by extension HTTP request(s). This tells you the maximum performance you can expect with the right platform with the right configuration. Today, I was worried whether IIS with ASP.NET would support in the order of 100 … Read more

How is TeamViewer so fast?

The most fundamental thing here probably is that you don’t want to transmit static images but only changes to the images, which essentially is analogous to video stream. My best guess is some very efficient (and heavily specialized and optimized) motion compensation algorithm, because most of the actual change in generic desktop usage is linear … Read more

java.net.URLEncoder.encode(String) is deprecated, what should I use instead?

Use the other encode method in URLEncoder: URLEncoder.encode(String, String) The first parameter is the text to encode; the second is the name of the character encoding to use (e.g., UTF-8). For example: System.out.println( URLEncoder.encode( “urlParameterString”, java.nio.charset.StandardCharsets.UTF_8.toString() ) );

What is the Difference Between read() and recv() , and Between send() and write()?

The difference is that recv()/send() work only on socket descriptors and let you specify certain options for the actual operation. Those functions are slightly more specialized (for instance, you can set a flag to ignore SIGPIPE, or to send out-of-band messages…). Functions read()/write() are the universal file descriptor functions working on all descriptors.

What browsers support HTML5 WebSocket API?

Client side Hixie-75: Chrome 4.0 + 5.0 Safari 5.0.0 HyBi-00/Hixie-76: Chrome 6.0 – 13.0 Safari 5.0.2 + 5.1 iOS 4.2 + iOS 5 Firefox 4.0 – support for WebSockets disabled. To enable it see here. Opera 11 – with support disabled. To enable it see here. HyBi-07+: Chrome 14.0 Firefox 6.0 – prefixed: MozWebSocket IE … Read more

Recommended way to get hostname in Java

Strictly speaking – you have no choice but calling either hostname(1) or – on Unix gethostname(2). This is the name of your computer. Any attempt to determine the hostname by an IP address like this InetAddress.getLocalHost().getHostName() is bound to fail in some circumstances: The IP address might not resolve into any name. Bad DNS setup, … Read more