mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 22:47:29 +08:00
29 lines
420 B
C++
29 lines
420 B
C++
|
// TODO: Implement TCPInterface.cpp
|
||
|
|
||
|
#include "TCPInterface.h"
|
||
|
|
||
|
TCPInterface::TCPInterface()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
Packet* TCPInterface::Receive( void )
|
||
|
{
|
||
|
if (isStarted==false)
|
||
|
return 0;
|
||
|
return incomingMessages.ReadLock();
|
||
|
}
|
||
|
PlayerID TCPInterface::HasLostConnection(void)
|
||
|
{
|
||
|
PlayerID *out;
|
||
|
out = lostConnections.ReadLock();
|
||
|
if (out)
|
||
|
{
|
||
|
lostConnections.ReadUnlock();
|
||
|
return *out;
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
return UNASSIGNED_PLAYER_ID;
|
||
|
}
|
||
|
}
|