Browse Source

Changed type to NetSocket

Changed some S32 types to use the typedef NetSocket since they are a
socket.
Nathan Bowhay 10 years ago
parent
commit
bc31d79da1
1 changed files with 3 additions and 3 deletions
  1. 3 3
      Engine/source/platform/platformNet.cpp

+ 3 - 3
Engine/source/platform/platformNet.cpp

@@ -141,7 +141,7 @@ static const char* strerror_wsa( S32 code )
 static Net::Error getLastError();
 static Net::Error getLastError();
 static S32 defaultPort = 28000;
 static S32 defaultPort = 28000;
 static S32 netPort = 0;
 static S32 netPort = 0;
-static S32 udpSocket = InvalidSocket;
+static NetSocket udpSocket = InvalidSocket;
 
 
 ConnectionNotifyEvent   Net::smConnectionNotify;
 ConnectionNotifyEvent   Net::smConnectionNotify;
 ConnectionAcceptedEvent Net::smConnectionAccept;
 ConnectionAcceptedEvent Net::smConnectionAccept;
@@ -790,7 +790,7 @@ void Net::process()
 
 
 NetSocket Net::openSocket()
 NetSocket Net::openSocket()
 {
 {
-   S32 retSocket;
+   NetSocket retSocket;
    retSocket = socket(AF_INET, SOCK_STREAM, 0);
    retSocket = socket(AF_INET, SOCK_STREAM, 0);
 
 
    if(retSocket == InvalidSocket)
    if(retSocket == InvalidSocket)
@@ -835,7 +835,7 @@ NetSocket Net::accept(NetSocket acceptSocket, NetAddress *remoteAddress)
    sockaddr_in socketAddress;
    sockaddr_in socketAddress;
    socklen_t addrLen = sizeof(socketAddress);
    socklen_t addrLen = sizeof(socketAddress);
 
 
-   S32 retVal = ::accept(acceptSocket, (sockaddr *) &socketAddress,  &addrLen);
+   NetSocket retVal = ::accept(acceptSocket, (sockaddr *) &socketAddress,  &addrLen);
    if(retVal != InvalidSocket)
    if(retVal != InvalidSocket)
    {
    {
       IPSocketToNetAddress(&socketAddress, remoteAddress);
       IPSocketToNetAddress(&socketAddress, remoteAddress);