mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-10-20 15:27:00 +00:00
possibly fix port in use
This commit is contained in:
1 parent
d44aa86ed1
commit
9ddab14f01
1 file changed
+3
@@ -273,6 +273,9 @@ void TCPServerMain(){
|
||||
// wondering why we need slightly different implementations of this?
|
||||
// ask ms.
|
||||
SOCKET client = -1, Listener = socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);
|
||||
int optval = 1;
|
||||
setsockopt(Listener, SOL_SOCKET, SO_REUSEPORT, &optval, sizeof(optval));
|
||||
// TODO: check optval or return value idk
|
||||
sockaddr_in addr{};
|
||||
addr.sin_addr.s_addr = INADDR_ANY;
|
||||
addr.sin_family = AF_INET;
|
||||
|
||||
Reference in new issue
Block a user