Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In TLS build of library, support both TLS and non-TLS connections. #137

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,16 @@ Get current namespace name which the client is inside.
#### Constructors
`client()` default constructor.

`client(const std::string& uri)`

Constructor with URI. This form of the constructor will select automatically
between TLS and non-TLS versions of the client if you are linking with the
TLS build. To use TLS, provide a URI with the `https://` or `wss://` scheme,
otherwise use 'http://' or 'ws://'. If an unsupported scheme is given, an
exception will be thrown.

After constructing with this URI, you may call `connect()` with no arguments.

#### Connection Listeners
`void set_open_listener(con_listener const& l)`

Expand Down Expand Up @@ -130,6 +140,10 @@ Set listener for socket close event, called when any sockets being closed, after
```

#### Connect and Close
`void connect()`

Connect to socket.io server URI previously given to the constructor.

`void connect(const std::string& uri)`

Connect to socket.io server, e.g., `client.connect("ws://localhost:3000");`
Expand Down
Loading