DataChannelServer
A C++ library for creating WebRTC DataChannel servers.
|
Classes | |
class | DataChannel |
A class which represents a single peer connection. More... | |
struct | DataChannelSettings |
DataChannelSettings specifies the settings for the created DataChannel. More... | |
class | Server |
A DataChannel server. More... | |
Typedefs | |
typedef std::function< void(std::shared_ptr< DataChannel >)> | ConnectHandler |
typedef std::function< void(const std::string &error)> | ErrorHandler |
typedef std::function< void(const std::string &message)> | MessageHandler |
typedef std::function< void()> | CloseHandler |
Functions | |
void | Connect (const std::string &server, int port, ConnectHandler handler, ErrorHandler error_handler) |
Connect to a DataChannel Server. More... | |
typedef std::function<void()> data_channel::CloseHandler |
typedef std::function<void(std::shared_ptr<DataChannel>)> data_channel::ConnectHandler |
typedef std::function<void(const std::string &error)> data_channel::ErrorHandler |
typedef std::function<void(const std::string &message)> data_channel::MessageHandler |
|
inline |
Connect to a DataChannel Server.
server | The domain name of the server. |
port | The port number of the server. |
handler | A callback for when the connection occurs. NOTE: the provided shared_ptr ownes the connection and the connection will be closed when the shared_ptr is destroyed. |
error_handler | A callback for errors while trying to connect. |