Skip to content

Commit f07bc03

Browse files
committed
Update clsocket and Open()/Listen() usage
1 parent a2b2c66 commit f07bc03

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

library/RemoteClient.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ bool RemoteClient::connect(int port)
155155
return false;
156156
}
157157

158-
if (!socket->Open((const uint8 *)"localhost", port))
158+
if (!socket->Open("localhost", port))
159159
{
160160
default_output().printerr("Could not connect to localhost: %d\n", port);
161161
return false;

library/RemoteServer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ bool ServerMain::listen(int port)
375375

376376
socket->Initialize();
377377

378-
if (!socket->Listen((const uint8 *)"127.0.0.1", port))
378+
if (!socket->Listen("127.0.0.1", port))
379379
return false;
380380

381381
thread = new tthread::thread(threadFn, this);

plugins/luasocket.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ static int lua_socket_bind(std::string ip,int port)
8383
handle_error(err,false);
8484
}
8585
sock->SetBlocking();
86-
if(!sock->Listen((uint8_t*)ip.c_str(),port))
86+
if(!sock->Listen(ip.c_str(),port))
8787
{
8888
handle_error(sock->GetSocketError(),false);
8989
}
@@ -238,7 +238,7 @@ static int lua_socket_connect(std::string ip,int port)
238238
delete sock;
239239
throw std::runtime_error(CSimpleSocket::DescribeError(err));
240240
}
241-
if(!sock->Open((const uint8_t*)ip.c_str(),port))
241+
if(!sock->Open(ip.c_str(),port))
242242
{
243243
CSimpleSocket::CSocketError err=sock->GetSocketError();
244244
delete sock;

0 commit comments

Comments
 (0)