mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2024-11-23 18:09:48 +00:00
Fix port forwarding and EINVAL on Unix
This commit is contained in:
parent
2d8992a547
commit
bc5ae1b7c1
3
test.cpp
3
test.cpp
@ -825,7 +825,8 @@ void ForwardTcpPort(const char *sourcePortName, const char *destinationHost, con
|
||||
sockListen.Create();
|
||||
sockListen.Bind(sourcePort);
|
||||
|
||||
int err = setsockopt(sockListen, IPPROTO_TCP, TCP_NODELAY, "\x01", 1);
|
||||
const int flag = 1;
|
||||
int err = setsockopt(sockListen, IPPROTO_TCP, TCP_NODELAY, (char*)&flag, sizeof(int));
|
||||
CRYPTOPP_ASSERT(err == 0);
|
||||
if(err != 0)
|
||||
throw Socket::Err(sockListen, "setsockopt", sockListen.GetLastError());
|
||||
|
Loading…
Reference in New Issue
Block a user