~ubuntu-branches/ubuntu/vivid/lua-nginx-websocket/vivid

« back to all changes in this revision

Viewing changes to README.markdown

  • Committer: Package Import Robot
  • Author(s): Laurent Arnoud
  • Date: 2015-01-23 16:30:12 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20150123163012-desyrtw01g4b0gsi
Tags: 0.05-1
* Imported Upstream version 0.05.
* debian/control: Added Vcs tags.
* debian/control: Remove unrequired dependency on lua-bitop.
* debian/control: Update Standards-Version to 3.9.6.
* debian/copyright: Fix invalid short name in dep5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
360
360
#### client:connect
361
361
`syntax: ok, err = wb:connect("ws://<host>:<port>/<path>")`
362
362
 
 
363
`syntax: ok, err = wb:connect("wss://<host>:<port>/<path>")`
 
364
 
363
365
`syntax: ok, err = wb:connect("ws://<host>:<port>/<path>", options)`
364
366
 
 
367
`syntax: ok, err = wb:connect("wss://<host>:<port>/<path>", options)`
 
368
 
365
369
Connects to the remote WebSocket service port and performs the websocket handshake process on the client side.
366
370
 
367
371
Before actually resolving the host name and connecting to the remote backend, this method will always look up the connection pool for matched idle connections created by previous calls of this method.
377
381
* `pool`
378
382
 
379
383
    Specifies a custom name for the connection pool being used. If omitted, then the connection pool name will be generated from the string template `<host>:<port>`.
 
384
* `ssl_verify`
 
385
 
 
386
    Specifies whether to perform SSL certificate verfication during the
 
387
SSL handshake if the `wss://` scheme is used.
 
388
 
 
389
The SSL connection mode (`wss://`) requires at least ngx_lua 0.9.11 or OpenResty 1.7.4.1.
380
390
 
381
391
[Back to TOC](#table-of-contents)
382
392
 
536
546
is bundled and enabled by default. At least ngx_openresty 1.4.2.9 is required. And you need to enable LuaJIT when building your ngx_openresty
537
547
bundle by passing the `--with-luajit` option to its `./configure` script. No extra Nginx configuration is required.
538
548
 
539
 
If you want to use this library with your own Nginx build (with ngx_lua), then you need to
540
 
ensure you are using at least ngx_lua 0.9.0. Also, You need to configure
541
 
the [lua_package_path](https://github.com/chaoslawful/lua-nginx-module#lua_package_path) directive to
542
 
add the path of your lua-resty-websocket source tree to ngx_lua's Lua module search path, as in
 
549
If you want to use this library with your own Nginx build (with ngx_lua), then
 
550
you need to ensure you are using at least ngx_lua 0.9.0
 
551
(and [lua-bitop](http://bitop.luajit.org/) library if you are not using LuaJIT).
 
552
Also, You need to configure the
 
553
[lua_package_path](https://github.com/chaoslawful/lua-nginx-module#lua_package_path)
 
554
directive to add the path of your lua-resty-websocket source tree to ngx_lua's
 
555
Lua module search path, as in
543
556
 
544
557
```nginx
545
558
    # nginx.conf