1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-14 03:37:16 +01:00
SqMod/modules/mg/WebSocket.cpp

40 lines
1.1 KiB
C++
Raw Normal View History

// ------------------------------------------------------------------------------------------------
#include "WebSocket.hpp"
#include "Manager.hpp"
// ------------------------------------------------------------------------------------------------
namespace SqMod {
// ------------------------------------------------------------------------------------------------
SQInteger WebSocket::Typename(HSQUIRRELVM vm)
{
static const SQChar name[] = _SC("SqMgWebSocket");
sq_pushstring(vm, name, sizeof(name));
return 1;
}
// ------------------------------------------------------------------------------------------------
Int32 WebSocket::Cmp(const WebSocket & o) const
{
if (m_Handle == o.m_Handle)
{
return 0;
}
else if (m_Handle.HndPtr() > o.m_Handle.HndPtr())
{
return 1;
}
else
{
return -1;
}
}
// ------------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------------
} // Namespace:: SqMod