locked
RFC 6455 - Web Socket Protocol Question. RRS feed

  • Question

  • Hello,

    I am not sure whether this could be right place where I could ask this kind of question.

    I try to implement web socket C# server based on RFC 6455 for Web Socket.

    According to Fragmentation section(5.4), a message can be fragmented.

    Is there any specific condition that a fragmented message should be sent?

    According to my testing of Fire Fox Browser 14.0.1, all message(at least test message I could come up with) was unfragmented message when I received them in server.

    If a message is too long, will it be fragmented when sending? I tried to send quite long message from FF, but it was still unfragmented message.

    Is there any way that I can see a fragmented message coming from a browser?

    Thanks,



    • Edited by T J Tuesday, August 7, 2012 5:42 PM
    Tuesday, August 7, 2012 5:31 PM

All replies

  • I'm not an expert on 6455, but I may help you understand what has happened.  In 6455 it is making an assumption that the reader understands TCP fragmentation and http chunks. 6455 is explaining how fragmentation and chunks work together.  HTTP uses TCP as the transport layer in sending reliable payloads.

    Http 1.1 is different from http 1.0 in it allow messages to be sent in chunks.  It is possible that the chunks can be fragmented. which is a bit in the IP header portion of the message.

    TCP allows for a maximum of 1500 (APPROXIMATELY) bytes per packet (payload). Every long HTTP and TCP message is broken into 1500 bytes.  This is NOT fragmentation.  TCP fragmentation deals with the each packet being fragmented.  The 1500 bytes can vary slightly between hosts because of options allowed for by the RFC specifications.  The fragmentation bit when NOT set requires any router or server to forward a packet without breaking a packet into a different size.  RFC specifications allows a router or server to reformat long messages by collecting packets, buffering the packets , and then resend the packets in different size messages.  This is often done in port forwarding.


    jdweng

    Wednesday, August 8, 2012 9:02 AM