21#include "MsgPackSocket.h"
37 std::set<std::shared_ptr<Socket>>
sockets;
47 void listen(
double waitUpToSeconds = 0.0);
Status
Defines the send status of a socket.
Definition Socket.h:81
Manages a group of Sockets.
Definition netLink.h:26
std::function< void(SocketManager *manager, std::shared_ptr< Socket > socket, std::unique_ptr< MsgPack::Element > element)> onReceiveMsgPack
Event which is called if a socket receives a MsgPack::Element.
Definition netLink.h:35
std::shared_ptr< Socket > newSocket()
Allocates a new Socket, inserts it into sockets and returns it.
Definition SocketManager.cpp:49
std::function< void(SocketManager *manager, std::shared_ptr< Socket > socket)> onReceiveRaw
Event which is called if a socket receives new raw data.
Definition netLink.h:33
std::function< bool(SocketManager *manager, std::shared_ptr< Socket > serverSocket, std::shared_ptr< Socket > clientSocket)> onConnectRequest
Event which is called if a TCP_SERVER accepts a new connection (if false is returned the connection w...
Definition netLink.h:29
std::function< void(SocketManager *manager, std::shared_ptr< Socket > socket, Socket::Status prev)> onStatusChange
Event which is called if a socket can or can not send more data (also called if nonblocking connect s...
Definition netLink.h:31
std::set< std::shared_ptr< Socket > > sockets
Sockets which are managed.
Definition netLink.h:37
void listen(double waitUpToSeconds=0.0)
Definition SocketManager.cpp:61
std::shared_ptr< Socket > newMsgPackSocket()
Allocates a new MsgPackSocket, inserts it into sockets and returns it.
Definition SocketManager.cpp:55