Network fixes suggested by glebm
This commit is contained in:
parent
0af36dc416
commit
b4f2beed6d
4 changed files with 6 additions and 9 deletions
|
|
@ -403,7 +403,6 @@ if(NOT NONET)
|
|||
Source/dvlnet/tcp_client.cpp
|
||||
Source/dvlnet/tcp_server.cpp
|
||||
Source/dvlnet/protocol_zt.cpp
|
||||
Source/dvlnet/base_protocol.cpp
|
||||
Source/dvlnet/zerotier_native.cpp
|
||||
Source/dvlnet/zerotier_lwip.cpp)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
#include "dvlnet/base_protocol.h"
|
||||
|
||||
#include <SDL.h>
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef USE_SDL1
|
||||
#include "utils/sdl2_to_1_2_backports.h"
|
||||
#endif
|
||||
|
|
@ -190,6 +190,7 @@ void base_protocol<P>::recv()
|
|||
for (plr_t i = 0; i < MAX_PLRS; ++i) {
|
||||
if (peers[i] == sender) {
|
||||
disconnect_net(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,11 @@ public:
|
|||
return addr == rhs.addr;
|
||||
}
|
||||
|
||||
bool operator!=(const endpoint &rhs) const
|
||||
{
|
||||
return !(*this == rhs);
|
||||
}
|
||||
|
||||
bool operator<(const endpoint &rhs) const
|
||||
{
|
||||
return addr < rhs.addr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue