diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-10-12 02:11:52 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-08-18 22:56:48 +0200 |
commit | e6fbb2dbc4496f04bed21e10d0260af358a9a74f (patch) | |
tree | 9e8f35019efa54dbb3b9c9050d7bfe4569c9169f /src | |
parent | 7b61bed0e0624fb33409c29dda5462029b42393b (diff) |
Use protocol type 0 as seen in udt example
Diffstat (limited to 'src')
-rw-r--r-- | src/DirectConnection.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/DirectConnection.cpp b/src/DirectConnection.cpp index 3108410..36d2d16 100644 --- a/src/DirectConnection.cpp +++ b/src/DirectConnection.cpp @@ -42,7 +42,7 @@ namespace sibs int DirectConnections::createSocket(const Ipv4 &addressToBind, bool rendezvous, bool reuseAddr, bool bind) { Log::debug("UDT: Creating socket for ipv4 address %s, port: %d", addressToBind.getAddress().c_str(), addressToBind.getPort()); - UDTSOCKET socket = UDT::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + UDTSOCKET socket = UDT::socket(AF_INET, SOCK_STREAM, 0); if(socket == UDT::INVALID_SOCK) { std::string errMsg = "UDT: Failed to create socket, error: "; @@ -100,7 +100,7 @@ namespace sibs return; } - Log::debug("DirectConnections: Connecting to peer (ip: %s, port: %d)", address.getAddress().c_str(), address.getPort()); + Log::debug("DirectConnections: Connecting to peer (ip: %s, port: %d, rendezvous: %s)", address.getAddress().c_str(), address.getPort(), rendezvous ? "yes" : "no"); if(UDT::connect(socket, (sockaddr*)&address.address, sizeof(address.address)) == UDT::ERROR) { if(connectCallbackFunc) |