Shop OBEX P1 Docs P2 Docs Learn Events
Multiple requests on the same socket. — Parallax Forums

Multiple requests on the same socket.

BeanBean Posts: 8,129
edited 2010-11-19 11:56 in Accessories
If I am running the web server demo by Timothy, and a different computer does a GET request while one is already being handled, does it just wait or will it fail ?

Bean

Comments

  • Roy ElthamRoy Eltham Posts: 3,000
    edited 2010-11-19 11:56
    Bean,

    The W5100 chip has a small buffer for packets. By default, each socket gets 2KB, but this can be reconfigured.

    So incoming packets will be buffered up to the buffer size. Any other packets are "dropped". However, the TCP protocol (which HTTP uses) deals with this and the server will resend any packets that are not acknowledged. TCP is a reliable transport layer that makes sure you get all the packets and in order.

    So you can just process packets at whatever speed you can, and rely on getting all of them eventually in the right order.
Sign In or Register to comment.