Socket Behavior in the HTTP Mode

When in the HTTP mode, the socket behaves differently compared to the normal data mode.


Incoming Connection Rejection

As was explained in Accepting Incoming Connections, if your device "decides" to reject an incoming TCP connection, it will send out a reset TCP packet. This way, the other host is instantly notified of the rejection. The rules are different for HTTP sockets:

This behavior allows your application to get away with fewer HTTP sockets. Here is why: If all HTTP sockets are busy and your application sends out a reset, the browser will show a "connection reset" message. If, however, your device does not reply at all, the browser will wait and resend its request later. Browsers are "patient" — they will typically try several times before giving up. If any HTTP sockets are freed up during this wait, the repeat request will be accepted and the browser will get its page. Therefore, a few HTTP sockets can handle a large number of page requests in a sequential manner and with few rejections.


Other Differences


Socket Behavior in the HTTP Mode

Incoming Connection Rejection

Other Differences