Update clsocket and Open()/Listen() usage

develop
lethosor 2016-06-14 13:21:51 -04:00
parent a2b2c66798
commit f07bc03c69
4 changed files with 5 additions and 5 deletions

@ -1 +1 @@
Subproject commit 55b6bfb8121991876282f1ba7db10ab091391e14
Subproject commit b08d765a7ddacf66693cb2721833b3b56b092aa3

@ -155,7 +155,7 @@ bool RemoteClient::connect(int port)
return false;
}
if (!socket->Open((const uint8 *)"localhost", port))
if (!socket->Open("localhost", port))
{
default_output().printerr("Could not connect to localhost: %d\n", port);
return false;

@ -375,7 +375,7 @@ bool ServerMain::listen(int port)
socket->Initialize();
if (!socket->Listen((const uint8 *)"127.0.0.1", port))
if (!socket->Listen("127.0.0.1", port))
return false;
thread = new tthread::thread(threadFn, this);

@ -83,7 +83,7 @@ static int lua_socket_bind(std::string ip,int port)
handle_error(err,false);
}
sock->SetBlocking();
if(!sock->Listen((uint8_t*)ip.c_str(),port))
if(!sock->Listen(ip.c_str(),port))
{
handle_error(sock->GetSocketError(),false);
}
@ -238,7 +238,7 @@ static int lua_socket_connect(std::string ip,int port)
delete sock;
throw std::runtime_error(CSimpleSocket::DescribeError(err));
}
if(!sock->Open((const uint8_t*)ip.c_str(),port))
if(!sock->Open(ip.c_str(),port))
{
CSimpleSocket::CSocketError err=sock->GetSocketError();
delete sock;