![]() |
UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
|
#include <client.hpp>


Public Types | |
| using | CompletionCallback = std::function<void(Client&, CompletionStatus)> |
Public Member Functions | |
| Client (asio::ip::tcp::socket &&socket) | |
| Client (Client &&)=delete | |
| Client (const Client &)=delete | |
| const std::vector< std::string > & | getCandidates () |
| std::string | getClientName () |
| std::string | getRoomName () |
| std::string | getSdpDesc () |
| bool | isSendCallbackPending () const |
| Client & | operator= (Client &&)=delete |
| Client & | operator= (const Client &)=delete |
| void | readCandidate (CompletionCallback onComplete) |
| void | readDescription (CompletionCallback onComplete) |
| void | sendMsg (std::string_view msg) |
Private Member Functions | |
| void | onMsgSent (CompletionStatus status) |
| void | readCandidateComplete (CompletionCallback onComplete, CompletionStatus status) |
| void | readDescComplete (CompletionCallback onComplete, CompletionStatus status) |
| void | readNameComplete (asio::ip::tcp::socket &socket, CompletionCallback onComplete, CompletionStatus status) |
| void | readRoomComplete (asio::ip::tcp::socket &socket, CompletionCallback onComplete, CompletionStatus status) |
Private Attributes | |
| std::vector< std::string > | candidates |
| std::string | clientName |
| Message | inMsg |
| Message | outMsg |
| std::string | roomName |
| std::string | sdpDesc |
| std::queue< std::string > | sendQueue |
| asio::ip::tcp::socket | socket |
Definition at line 49 of file client.hpp.
| using Client::CompletionCallback = std::function<void(Client&, CompletionStatus)> |
Definition at line 51 of file client.hpp.
| Client::Client | ( | asio::ip::tcp::socket && | socket | ) |
Definition at line 40 of file client.cpp.
|
delete |
|
delete |
|
inline |
|
inline |
|
inline |
|
inline |
| bool Client::isSendCallbackPending | ( | ) | const |
Definition at line 118 of file client.cpp.
References Message::isSendingNow(), outMsg, and sendQueue.
Referenced by sendMsg().

|
private |
Definition at line 134 of file client.cpp.
References Message::async_sendMsg(), onMsgSent(), outMsg, sendQueue, Message::setStr(), socket, and Success.
Referenced by onMsgSent(), and sendMsg().

| void Client::readCandidate | ( | CompletionCallback | onComplete | ) |
Definition at line 93 of file client.cpp.
References Message::async_readMsg(), inMsg, readCandidateComplete(), and socket.
Referenced by Room::addClient().

|
private |
Definition at line 100 of file client.cpp.
References candidates, Message::getStr(), GracefulDisconnect, inMsg, and Success.
Referenced by readCandidate().

|
private |
Definition at line 80 of file client.cpp.
References Message::getStr(), inMsg, sdpDesc, and Success.
Referenced by readRoomComplete().

| void Client::readDescription | ( | CompletionCallback | onComplete | ) |
Definition at line 42 of file client.cpp.
References Message::async_readMsg(), inMsg, readNameComplete(), and socket.

|
private |
Definition at line 49 of file client.cpp.
References Message::async_readMsg(), clientName, Message::getStr(), inMsg, readRoomComplete(), socket, and Success.
Referenced by readDescription().

|
private |
Definition at line 65 of file client.cpp.
References Message::async_readMsg(), Message::getStr(), inMsg, readDescComplete(), roomName, socket, and Success.
Referenced by readNameComplete().

| void Client::sendMsg | ( | std::string_view | msg | ) |
Definition at line 123 of file client.cpp.
References Message::async_sendMsg(), isSendCallbackPending(), onMsgSent(), outMsg, sendQueue, Message::setStr(), and socket.
Referenced by Room::addClient().

|
private |
Definition at line 90 of file client.hpp.
Referenced by getCandidates(), and readCandidateComplete().
|
private |
Definition at line 87 of file client.hpp.
Referenced by getClientName(), and readNameComplete().
|
private |
Definition at line 94 of file client.hpp.
Referenced by readCandidate(), readCandidateComplete(), readDescComplete(), readDescription(), readNameComplete(), and readRoomComplete().
|
private |
Definition at line 95 of file client.hpp.
Referenced by isSendCallbackPending(), onMsgSent(), and sendMsg().
|
private |
Definition at line 88 of file client.hpp.
Referenced by getRoomName(), and readRoomComplete().
|
private |
Definition at line 89 of file client.hpp.
Referenced by getSdpDesc(), and readDescComplete().
|
private |
Definition at line 92 of file client.hpp.
Referenced by isSendCallbackPending(), onMsgSent(), and sendMsg().
|
private |
Definition at line 96 of file client.hpp.
Referenced by onMsgSent(), readCandidate(), readDescription(), readNameComplete(), readRoomComplete(), and sendMsg().