summaryrefslogtreecommitdiff
path: root/index.html
blob: 5392c6319def5ed08690845d82e366fd4194c62d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!DOCTYPE html>
<html>

  <head>
    <meta charset='utf-8' />
    <meta http-equiv="X-UA-Compatible" content="chrome=1" />
    <meta name="description" content="QWebSockets : QWebSockets is a pure Qt implementation of WebSockets - both client and server." />

    <link rel="stylesheet" type="text/css" media="screen" href="stylesheets/stylesheet.css">

    <title>QWebSockets</title>
  </head>

  <body>

    <!-- HEADER -->
    <div id="header_wrap" class="outer">
        <header class="inner">
          <a id="forkme_banner" href="https://github.com/KurtPattyn/QWebSockets">View on GitHub</a>

          <h1 id="project_title">QWebSockets</h1>
          <h2 id="project_tagline">QWebSockets is a pure Qt implementation of WebSockets - both client and server.</h2>

            <section id="downloads">
              <a class="zip_download_link" href="https://github.com/KurtPattyn/QWebSockets/zipball/master">Download this project as a .zip file</a>
              <a class="tar_download_link" href="https://github.com/KurtPattyn/QWebSockets/tarball/master">Download this project as a tar.gz file</a>
            </section>
        </header>
    </div>

    <!-- MAIN CONTENT -->
    <div id="main_content_wrap" class="outer">
      <section id="main_content" class="inner">
        <h3>
<a name="introduction" class="anchor" href="#introduction"><span class="octicon octicon-link"></span></a>Introduction</h3>

<p>QWebSockets is a pure Qt implementation of WebSockets - both client and server.
It is implemented as a Qt source code module (.pri file), that can easily be embedded into existing Qt projects. It has no other dependencies that Qt.</p>

<h3>
<a name="features" class="anchor" href="#features"><span class="octicon octicon-link"></span></a>Features</h3>

<ul>
<li>Text and binary sockets</li>
<li>Frame-based and message-based signals</li>
<li>Works through proxies</li>
<li>Strict Unicode checking</li>
</ul><h3>
<a name="restrictions" class="anchor" href="#restrictions"><span class="octicon octicon-link"></span></a>Restrictions</h3>

<p>Non-characters (according <a href="http://www.unicode.org/versions/Unicode6.2.0/">Unicode Standard 6.2</a>) are rejected by QWebSockets, <strong>even if the UTF-8 sequence is valid</strong>.  </p>

<h5>
<a name="rationale" class="anchor" href="#rationale"><span class="octicon octicon-link"></span></a>Rationale</h5>

<p>The WebSocket specification is talking about <em>Valid UTF-8 codes and sequences</em>. Strictly speaking, UTF-xx encodings are reversible. That means, that the <a href="http://www.unicode.org/faq/private_use.html#noncharacters">66 non-character codes</a> (including <code>U+FFFE</code> and <code>U+FFFF</code>), are valid UTF-8, and hence are perfectly acceptable within WebSocket text messages.<br>
According to the Unicode standard, they SHOULD NOT be used in information interchange, but a <a href="http://www.unicode.org/versions/corrigendum9.html">recent corrigendum</a> clarifies that non-characters CAN be exchanged.<br>
However, non-characters are for internal use, and hence, they are implementation specific (e.g. non-characters can be used to carry meta-information). <em>They have to be interpreted.</em><br>
When used with <code>QString</code>, they are replaced with <code>U+FFFD - REPLACEMENT CHARACTER</code>, and rendered - non-standard - as a question mark (this is the <code>QString</code> rendering of the non-character <code>U+FFFD</code>: �). Browsers keep the control characters untouched (this is the browser rendering of the non-character <code>U+FDD0</code>: ﷐).  </p>

<p>With QWebSockets, text messages are just that: a collection of human-readable characters. Text messages never have to be interpreted to be rendered correctly. In case, you still want to do implementation specific trickery, use binary messages instead. Indeed, if non-characters were allowed in text messages, then every text message has to be parsed, character-per-character, to find out if it contains special control codes, or a protocol should be devised that indicates whether the message contains that kind of control codes. We keep it simple: text is text and nothing more.</p>

<h3>
<a name="requirements" class="anchor" href="#requirements"><span class="octicon octicon-link"></span></a>Requirements</h3>

<p>Qt 5.x</p>

<h3>
<a name="compliance" class="anchor" href="#compliance"><span class="octicon octicon-link"></span></a>Compliance</h3>

<p>QWebSockets is compliant with <a href="http://datatracker.ietf.org/doc/rfc6455/?include_text=1">RFC6455</a> and has been tested with the <a href="http://autobahn.ws/testsuite">Autobahn Testsuite</a>.<br>
Only tests with <strong>invalid Unicode code points</strong> do <strong>not</strong> pass from the Autobahn Testsuite (see <a href="#Restrictions">Restrictions</a>). </p>

<h3>
<a name="missing-features" class="anchor" href="#missing-features"><span class="octicon octicon-link"></span></a>Missing Features</h3>

<ul>
<li>WSS protocol</li>
<li>Extensions and sub-protocols</li>
</ul><h3>
<a name="license" class="anchor" href="#license"><span class="octicon octicon-link"></span></a>License</h3>

<p>This code is licensed under LGPL v2.1.</p>
      </section>
    </div>

    <!-- FOOTER  -->
    <div id="footer_wrap" class="outer">
      <footer class="inner">
        <p class="copyright">QWebSockets maintained by <a href="https://github.com/KurtPattyn">KurtPattyn</a></p>
        <p>Published with <a href="http://pages.github.com">GitHub Pages</a></p>
      </footer>
    </div>

              <script type="text/javascript">
            var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
            document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
          </script>
          <script type="text/javascript">
            try {
              var pageTracker = _gat._getTracker("UA-43042417-1");
            pageTracker._trackPageview();
            } catch(err) {}
          </script>


  </body>
</html>