This commit is contained in:
@@ -683,8 +683,9 @@ result_t NetworkDevice::open() {
|
|||||||
}
|
}
|
||||||
int ret;
|
int ret;
|
||||||
if (m_udp) {
|
if (m_udp) {
|
||||||
address.sin_addr.s_addr = INADDR_ANY;
|
struct sockaddr_in bindAddress = address;
|
||||||
ret = bind(m_fd, (struct sockaddr*)&address, sizeof(address));
|
bindAddress.sin_addr.s_addr = INADDR_ANY;
|
||||||
|
ret = bind(m_fd, (struct sockaddr*)&bindAddress, sizeof(address));
|
||||||
} else {
|
} else {
|
||||||
int value = 1;
|
int value = 1;
|
||||||
ret = setsockopt(m_fd, IPPROTO_TCP, TCP_NODELAY, reinterpret_cast<void*>(&value), sizeof(value));
|
ret = setsockopt(m_fd, IPPROTO_TCP, TCP_NODELAY, reinterpret_cast<void*>(&value), sizeof(value));
|
||||||
|
|||||||
Reference in New Issue
Block a user