fix: socket invalid type
This commit is contained in:
@@ -16,7 +16,7 @@ Socket::Socket(Type type)
|
|||||||
: m_Blocking(false),
|
: m_Blocking(false),
|
||||||
m_Type(type),
|
m_Type(type),
|
||||||
m_Status(Disconnected),
|
m_Status(Disconnected),
|
||||||
m_Handle(INVALID_SOCKET)
|
m_Handle((SocketHandle) INVALID_SOCKET)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace network {
|
|||||||
TCPSocket::TCPSocket()
|
TCPSocket::TCPSocket()
|
||||||
: Socket(Socket::TCP), m_Port(0)
|
: Socket(Socket::TCP), m_Port(0)
|
||||||
{
|
{
|
||||||
m_Handle = INVALID_SOCKET;
|
m_Handle = (SocketHandle) INVALID_SOCKET;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TCPSocket::Connect(const IPAddress& address, unsigned short port) {
|
bool TCPSocket::Connect(const IPAddress& address, unsigned short port) {
|
||||||
@@ -125,7 +125,7 @@ TCPSocket::TCPSocket(TCPSocket&& other) : Socket(TCP){
|
|||||||
m_RemoteIP = other.m_RemoteIP;
|
m_RemoteIP = other.m_RemoteIP;
|
||||||
SetStatus(other.GetStatus());
|
SetStatus(other.GetStatus());
|
||||||
SetBlocking(other.IsBlocking());
|
SetBlocking(other.IsBlocking());
|
||||||
other.m_Handle = INVALID_SOCKET;
|
other.m_Handle = (SocketHandle) INVALID_SOCKET;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SendPacket(const DataBuffer& data, network::TCPSocket& socket){
|
void SendPacket(const DataBuffer& data, network::TCPSocket& socket){
|
||||||
|
|||||||
Reference in New Issue
Block a user