Skip to content

Commit f25fbbe

Browse files
committed
initializing the socket descriptor according to the platform
1 parent 8399739 commit f25fbbe

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/dds.net-connector-cpp.lib/connector/src/internal/src/network_client.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,16 @@ dds::net::connector::_internal::
5656
this->ipv4 = "";
5757
this->tcpPort = 0;
5858
this->isConnected = false;
59+
5960
this->socketFileDescriptor = -1;
61+
#elif TARGET_PLATFORM == PLATFORM_WINDOWS
62+
this->socketFileDescriptor = INVALID_SOCKET;
63+
#else
64+
#error "Cannot initialize this->socketFileDescriptor on selected platform"
65+
#endif
6066

61-
memset(&this->targetSocketAddress, 0, sizeof(this->targetSocketAddress));
6267

68+
memset(&this->targetSocketAddress, 0, sizeof(this->targetSocketAddress));
6369

6470

6571
#if TARGET_PLATFORM == PLATFORM_WINDOWS

0 commit comments

Comments
 (0)