aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <0xdec05eba@gmail.com>2018-10-12 02:11:52 +0200
committerdec05eba <0xdec05eba@gmail.com>2018-10-12 02:12:01 +0200
commit7c9cc9aea831bf3e80a5d356e1b88dc63b074a76 (patch)
treee896af6594ab5d5a0b9bc4f028d5bb5f6394b9d6
parentbe9d387bf558e162c37adcd6d5b1b387f2181848 (diff)
Use protocol type 0 as seen in udt example
-rw-r--r--project.conf1
-rw-r--r--src/DirectConnection.cpp4
2 files changed, 2 insertions, 3 deletions
diff --git a/project.conf b/project.conf
index 403141a..6659455 100644
--- a/project.conf
+++ b/project.conf
@@ -2,7 +2,6 @@
name = "sibs-pubsub"
version = "0.1.0"
type = "static"
-tests = "tests"
platforms = ["any"]
[config]
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)