(socket servers) merge the ConnectionInfo class with the ConnectionState one, which simplify all the server apis

This commit is contained in:
Benjamin Sergeant
2020-08-28 14:55:40 -07:00
parent 629c155044
commit 73b9c0b89b
25 changed files with 97 additions and 123 deletions

View File

@ -56,10 +56,9 @@ namespace ix
server.setOnConnectionCallback(
[remoteUrl, remoteUrlsMapping](std::weak_ptr<ix::WebSocket> webSocket,
std::shared_ptr<ConnectionState> connectionState,
std::unique_ptr<ConnectionInfo> connectionInfo) {
std::shared_ptr<ConnectionState> connectionState) {
auto state = std::dynamic_pointer_cast<ProxyConnectionState>(connectionState);
auto remoteIp = connectionInfo->remoteIp;
auto remoteIp = connectionState->getRemoteIp();
// Server connection
state->webSocket().setOnMessageCallback(