mirror of
https://github.com/socketio/socket.io-client-cpp.git
synced 2026-06-09 19:54:46 +00:00
Notes about namespace and message object creation.
This commit is contained in:
parent
a94d95ac59
commit
6c899ed243
@ -125,6 +125,11 @@ Close the client, return until it is really closed.
|
||||
|
||||
Check if client is connected.
|
||||
|
||||
### Namespace
|
||||
`void connect(const std::string& uri)`
|
||||
|
||||
Add namespace part `/[any namespaces]` after port, will automatically connect to the namespace you specified.
|
||||
|
||||
### Session ID
|
||||
`std::string const& get_sessionid() const`
|
||||
|
||||
@ -145,6 +150,8 @@ Get socket.io session id.
|
||||
|
||||
`message::ptr` pointer to `message` object, it will be one of its derived classes, judge by `message.get_flag()`.
|
||||
|
||||
All designated constructor of `message` objects is hidden, you need to create message and get the `message::ptr` by `[derived]_message:create()`.
|
||||
|
||||
##Example
|
||||
|
||||
Simple Console client Login to socket.io [chat room demo](https://github.com/Automattic/socket.io/tree/master/examples/chat).
|
||||
@ -247,4 +254,4 @@ Use this [shell](https://github.com/socketio/socket.io-client-cpp/blob/master/ex
|
||||
Finally, Add boost source folder to `header search path`, and add static libs to link option.
|
||||
|
||||
##License
|
||||
BSD
|
||||
BSD
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user