Skip to content

Commit

Permalink
Updated README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
FredyH committed Jun 28, 2020
1 parent 5f14632 commit 33b946e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,18 @@ require("gwsockets")

*NOTE:* If you want your websockets to use SSL but don't have a trusted certificate, you can set the second parameter to false.

* If you are running certain versions of Linux (e.g. CentOS) it might be necessary to specify a different path for the root certificates. This is only required if you want to use SSL and verify set verifyCertificates to true when creating a websocket.
```LUA
GWSockets.addVerifyPath( "/etc/ssl/certs" )
```

* Next add any cookies or headers you would like to send with the initial request (Optional)

```LUA
WEBSOCKET:setHeader( key, value )
WEBSOCKET:setCookie( key, value )
```

* Add some callbacks (Optional)

```LUA
Expand Down
1 change: 1 addition & 0 deletions src/GLua.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ LUA_FUNCTION(addVerifyPath) {
std::string errorMessage = "Failed setting SSL verify path: " + ec.message();
throwErrorNoHalt(LUA, errorMessage);
}
return 0;
}

void pcall(ILuaBase* LUA, int numArgs)
Expand Down

0 comments on commit 33b946e

Please sign in to comment.