Skip to content

Commit fb71b79

Browse files
ppentchevlws-team
authored andcommitted
Subject: Fix some typographical and grammatical errors.
1 parent f94bef4 commit fb71b79

17 files changed

+25
-25
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ if (NOT LWS_HAVE_inline)
417417
endif()
418418
endif()
419419

420-
# Put the libaries and binaries that get built into directories at the
420+
# Put the libraries and binaries that get built into directories at the
421421
# top of the build tree rather than in hard-to-find leaf directories.
422422
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")
423423
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")

README.build.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,11 +269,11 @@ and cd into it
269269

270270

271271
To set compile time flags you can either use one of the CMake gui applications
272-
or do it via command line.
272+
or do it via the command line.
273273

274274
@subsection cmcocl Command line
275275

276-
To list avaialable options (omit the H if you don't want the help text):
276+
To list available options (omit the H if you don't want the help text):
277277

278278
cmake -LH ..
279279

README.coding.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ allow up to that many connections, minus whatever other file descriptors are
2222
in use by the user code.
2323

2424
If you want to restrict that allocation, or increase it, you can use ulimit or
25-
similar to change the avaiable number of file descriptors, and when restarted
25+
similar to change the available number of file descriptors, and when restarted
2626
**libwebsockets** will adapt accordingly.
2727

2828

README.test-apps.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ The test client supports SSL too, use
125125
$ libwebsockets-test-client localhost --ssl -s
126126
```
127127

128-
the -s tells it to accept the default selfsigned cert from the server,
128+
the -s tells it to accept the default self-signed cert from the server,
129129
otherwise it will strictly fail the connection if there is no CA cert to
130130
validate the server's certificate.
131131

@@ -173,7 +173,7 @@ To test SSL/WSS client action, just run the client test with
173173
```
174174
$ libwebsockets-test-client localhost --ssl
175175
```
176-
By default the client test applet is set to accept selfsigned
176+
By default the client test applet is set to accept self-signed
177177
certificates used by the test server, this is indicated by the
178178
`use_ssl` var being set to `2`. Set it to `1` to reject any server
179179
certificate that it doesn't have a trusted CA cert for.
@@ -221,7 +221,7 @@ Before you can even use the PING opcode that is part of the
221221
standard, you must complete a handshake with a specified
222222
protocol. By default lws-mirror-protocol is used which is
223223
supported by the test server. But if you are using it on
224-
another server, you can specify the protcol to handshake with
224+
another server, you can specify the protocol to handshake with
225225
by `--protocol=protocolname`
226226

227227

@@ -369,7 +369,7 @@ to see the results
369369
@section autobahnnotes Autobahn Test Notes
370370

371371
1) Autobahn tests the user code + lws implementation. So to get the same
372-
results, you need to follow test-echo.c in terms of user implmentation.
372+
results, you need to follow test-echo.c in terms of user implementation.
373373

374374
2) Two of the tests make no sense for Libwebsockets to support and we fail them.
375375

doc/html/md_README.build.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,10 @@ <h1><a class="anchor" id="cmwmgw"></a>
158158
<p>8) yotta build</p>
159159
<h1><a class="anchor" id="cmco"></a>
160160
Setting compile options</h1>
161-
<p>To set compile time flags you can either use one of the CMake gui applications or do it via command line.</p>
161+
<p>To set compile time flags you can either use one of the CMake gui applications or do it via the command line.</p>
162162
<h2><a class="anchor" id="cmcocl"></a>
163163
Command line</h2>
164-
<p>To list avaialable options (omit the H if you don't want the help text): </p><pre class="fragment"> cmake -LH ..
164+
<p>To list available options (omit the H if you don't want the help text): </p><pre class="fragment"> cmake -LH ..
165165
</pre><p>Then to set an option and build (for example turn off SSL support): </p><pre class="fragment"> cmake -DLWS_WITH_SSL=0 ..
166166
</pre><p> or cmake -DLWS_WITH_SSL:BOOL=OFF ..</p>
167167
<h2><a class="anchor" id="cmcoug"></a>

doc/html/md_README.coding.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
<h1><a class="anchor" id="conns"></a>
7373
Maximum number of connections</h1>
7474
<p>The maximum number of connections the library can deal with is decided when it starts by querying the OS to find out how many file descriptors it is allowed to open (1024 on Fedora for example). It then allocates arrays that allow up to that many connections, minus whatever other file descriptors are in use by the user code.</p>
75-
<p>If you want to restrict that allocation, or increase it, you can use ulimit or similar to change the avaiable number of file descriptors, and when restarted <b>libwebsockets</b> will adapt accordingly.</p>
75+
<p>If you want to restrict that allocation, or increase it, you can use ulimit or similar to change the available number of file descriptors, and when restarted <b>libwebsockets</b> will adapt accordingly.</p>
7676
<h1><a class="anchor" id="evtloop"></a>
7777
Libwebsockets is singlethreaded</h1>
7878
<p>Libwebsockets works in a serialized event loop, in a single thread.</p>

doc/html/md_README.test-apps.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ <h1><a class="anchor" id="wscl"></a>
102102
<p>If you run the test server as described above, you can also connect to it using the test client as well as a browser.</p>
103103
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;$ libwebsockets-test-client localhost</div></div><!-- fragment --><p>will by default connect to the test server on localhost:7681 and print the dumb increment number from the server at the same time as drawing random circles in the mirror protocol; if you connect to the test server using a browser at the same time you will be able to see the circles being drawn.</p>
104104
<p>The test client supports SSL too, use</p>
105-
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;$ libwebsockets-test-client localhost --ssl -s</div></div><!-- fragment --><p>the -s tells it to accept the default selfsigned cert from the server, otherwise it will strictly fail the connection if there is no CA cert to validate the server's certificate.</p>
105+
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;$ libwebsockets-test-client localhost --ssl -s</div></div><!-- fragment --><p>the -s tells it to accept the default self-signed cert from the server, otherwise it will strictly fail the connection if there is no CA cert to validate the server's certificate.</p>
106106
<h1><a class="anchor" id="choosingts"></a>
107107
Choosing between test server variations</h1>
108108
<p>If you will be doing standalone serving with lws, ideally you should avoid making your own server at all, and use lwsws with your own protocol plugins.</p>
@@ -114,13 +114,13 @@ <h1><a class="anchor" id="echo"></a>
114114
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;$ libwebsockets-test-echo --client echo.websocket.org</div></div><!-- fragment --><p>This echo test is of limited use though because it doesn't negotiate any protocol. You can run the same test app as a local server, by default on localhost:7681 </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;$ libwebsockets-test-echo</div></div><!-- fragment --><p> and do the echo test against the local echo server </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;$ libwebsockets-test-echo --client localhost --port 7681</div></div><!-- fragment --><p> If you add the <code>--ssl</code> switch to both the client and server, you can also test with an encrypted link.</p>
115115
<h1><a class="anchor" id="tassl"></a>
116116
Testing SSL on the client side</h1>
117-
<p>To test SSL/WSS client action, just run the client test with </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;$ libwebsockets-test-client localhost --ssl</div></div><!-- fragment --><p> By default the client test applet is set to accept selfsigned certificates used by the test server, this is indicated by the <code>use_ssl</code> var being set to <code>2</code>. Set it to <code>1</code> to reject any server certificate that it doesn't have a trusted CA cert for.</p>
117+
<p>To test SSL/WSS client action, just run the client test with </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;$ libwebsockets-test-client localhost --ssl</div></div><!-- fragment --><p> By default the client test applet is set to accept self-signed certificates used by the test server, this is indicated by the <code>use_ssl</code> var being set to <code>2</code>. Set it to <code>1</code> to reject any server certificate that it doesn't have a trusted CA cert for.</p>
118118
<h1><a class="anchor" id="taping"></a>
119119
Using the websocket ping utility</h1>
120120
<p>libwebsockets-test-ping connects as a client to a remote websocket server and pings it like the normal unix ping utility. </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;$ libwebsockets-test-ping localhost</div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;handshake OK for protocol lws-mirror-protocol</div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;Websocket PING localhost.localdomain (127.0.0.1) 64 bytes of data.</div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;64 bytes from localhost: req=1 time=0.1ms</div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;64 bytes from localhost: req=2 time=0.1ms</div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;64 bytes from localhost: req=3 time=0.1ms</div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;64 bytes from localhost: req=4 time=0.2ms</div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;64 bytes from localhost: req=5 time=0.1ms</div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;64 bytes from localhost: req=6 time=0.2ms</div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;64 bytes from localhost: req=7 time=0.2ms</div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;64 bytes from localhost: req=8 time=0.1ms</div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;^C</div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;--- localhost.localdomain websocket ping statistics ---</div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;8 packets transmitted, 8 received, 0% packet loss, time 7458ms</div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;rtt min/avg/max = 0.110/0.185/0.218 ms</div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;$</div></div><!-- fragment --><p> By default it sends 64 byte payload packets using the 04 PING packet opcode type. You can change the payload size using the <code>-s=</code> flag, up to a maximum of 125 mandated by the 04 standard.</p>
121121
<p>Using the lws-mirror protocol that is provided by the test server, libwebsockets-test-ping can also use larger payload sizes up to 4096 is BINARY packets; lws-mirror will copy them back to the client and they appear as a PONG. Use the <code>-m</code> flag to select this operation.</p>
122122
<p>The default interval between pings is 1s, you can use the -i= flag to set this, including fractions like <code>-i=0.01</code> for 10ms interval.</p>
123-
<p>Before you can even use the PING opcode that is part of the standard, you must complete a handshake with a specified protocol. By default lws-mirror-protocol is used which is supported by the test server. But if you are using it on another server, you can specify the protcol to handshake with by <code>--protocol=protocolname</code></p>
123+
<p>Before you can even use the PING opcode that is part of the standard, you must complete a handshake with a specified protocol. By default lws-mirror-protocol is used which is supported by the test server. But if you are using it on another server, you can specify the protocol to handshake with by <code>--protocol=protocolname</code></p>
124124
<h1><a class="anchor" id="ta"></a>
125125
fraggle Fraggle test app</h1>
126126
<p>By default it runs in server mode </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;$ libwebsockets-test-fraggle</div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;libwebsockets test fraggle</div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;(C) Copyright 2010-2011 Andy Green &lt;[email protected]&gt; licensed under LGPL2.1</div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160; Compiled with SSL support, not using it</div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160; Listening on port 7681</div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;server sees client connect</div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;accepted v06 connection</div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;Spamming 360 random fragments</div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;Spamming session over, len = 371913. sum = 0x2D3C0AE</div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;Spamming 895 random fragments</div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;Spamming session over, len = 875970. sum = 0x6A74DA1</div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;...</div></div><!-- fragment --><p> You need to run a second session in client mode, you have to give the <code>-c</code> switch and the server address at least: </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;$ libwebsockets-test-fraggle -c localhost</div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;libwebsockets test fraggle</div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;(C) Copyright 2010-2011 Andy Green &lt;[email protected]&gt; licensed under LGPL2.1</div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160; Client mode</div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;Connecting to localhost:7681</div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;denied deflate-stream extension</div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;handshake OK for protocol fraggle-protocol</div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;client connects to server</div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;EOM received 371913 correctly from 360 fragments</div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;EOM received 875970 correctly from 895 fragments</div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;EOM received 247140 correctly from 258 fragments</div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;EOM received 695451 correctly from 692 fragments</div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;...</div></div><!-- fragment --><p> The fraggle test sends a random number up to 1024 fragmented websocket frames each of a random size between 1 and 2001 bytes in a single message, then sends a checksum and starts sending a new randomly sized and fragmented message.</p>
@@ -170,7 +170,7 @@ <h1><a class="anchor" id="autobahn"></a>
170170
<p>to see the results</p>
171171
<h1><a class="anchor" id="autobahnnotes"></a>
172172
Autobahn Test Notes</h1>
173-
<p>1) Autobahn tests the user code + lws implementation. So to get the same results, you need to follow test-echo.c in terms of user implmentation.</p>
173+
<p>1) Autobahn tests the user code + lws implementation. So to get the same results, you need to follow test-echo.c in terms of user implementation.</p>
174174
<p>2) Two of the tests make no sense for Libwebsockets to support and we fail them.</p>
175175
<ul>
176176
<li>Tests 2.10 + 2.11: sends multiple pings on one connection. Lws policy is to only allow one active ping in flight on each connection, the rest are dropped. The autobahn test itself admits this is not part of the standard, just someone's random opinion about how they think a ws server should act. So we will fail this by design and it is no problem about RFC6455 compliance. </li>

lib/http2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ int lws_http2_do_pps_send(struct lws_context *context, struct lws *wsi)
479479
wsi->u.http.fd = LWS_INVALID_FILE;
480480

481481
if (lws_is_ssl(lws_http2_get_network_wsi(wsi))) {
482-
lwsl_info("skipping nonexistant ssl upgrade headers\n");
482+
lwsl_info("skipping nonexistent ssl upgrade headers\n");
483483
break;
484484
}
485485

lib/libwebsockets.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1803,7 +1803,7 @@ lws_create_basic_wsi(struct lws_context *context, int tsi)
18031803
new_wsi->pending_timeout = NO_PENDING_TIMEOUT;
18041804
new_wsi->rxflow_change_to = LWS_RXFLOW_ALLOW;
18051805

1806-
/* intialize the instance struct */
1806+
/* initialize the instance struct */
18071807

18081808
new_wsi->state = LWSS_CGI;
18091809
new_wsi->mode = LWSCM_CGI;

lib/lws-plat-unix.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ lws_interface_to_sa(int ipv6, const char *ifname, struct sockaddr_in *addr,
534534
freeifaddrs(ifr);
535535

536536
if (rc == -1) {
537-
/* check if bind to IP adddress */
537+
/* check if bind to IP address */
538538
#ifdef LWS_USE_IPV6
539539
if (inet_pton(AF_INET6, ifname, &addr6->sin6_addr) == 1)
540540
rc = 0;

0 commit comments

Comments
 (0)