diff --git a/Code/Network/NetworkDependencies/Connection.cpp b/Code/Network/NetworkDependencies/Connection.cpp index 97b798d1..64111034 100644 --- a/Code/Network/NetworkDependencies/Connection.cpp +++ b/Code/Network/NetworkDependencies/Connection.cpp @@ -101,12 +101,12 @@ void Connection::Disconnect() closesocket(mySocket); } -bool Connection::Send(int socket , const char message[]) +bool Connection::Send(const char message[]) { int nBytes; unsigned long messageSize = strlen(message); - if((nBytes = send(socket, message , messageSize, 0)) == SOCKET_ERROR) + if((nBytes = send(mySocket, message , messageSize, 0)) == SOCKET_ERROR) { //Send failed! return false; @@ -115,10 +115,10 @@ bool Connection::Send(int socket , const char message[]) return true; } -int Recieve(int socket, char message[]) +int Connection::Recieve(char message[]) { int nBytes; - nBytes = recv(socket, message , 255, 0); + nBytes = recv(mySocket, message , 255, 0); if(nBytes == SOCKET_ERROR) { //Recv failed diff --git a/Code/Network/NetworkDependencies/Connection.h b/Code/Network/NetworkDependencies/Connection.h index 96dda6fd..28804cb1 100644 --- a/Code/Network/NetworkDependencies/Connection.h +++ b/Code/Network/NetworkDependencies/Connection.h @@ -20,8 +20,8 @@ class Connection : public IConnection virtual bool Connect( unsigned short port , const char serverName[] ); virtual bool InitiateServer( unsigned short port ); virtual void Disconnect(); - virtual bool Send(int socket , const char message[]); - virtual int Recieve(int socket); + virtual bool Send(const char message[]); + virtual int Recieve(char message[]); virtual int Listen(); }; diff --git a/Code/Network/NetworkDependencies/IConnection.h b/Code/Network/NetworkDependencies/IConnection.h index ec7feb50..fd3610fc 100644 --- a/Code/Network/NetworkDependencies/IConnection.h +++ b/Code/Network/NetworkDependencies/IConnection.h @@ -14,8 +14,8 @@ class IConnection virtual bool Connect( unsigned short port, const char serverName[] ) = 0; virtual bool InitiateServer( unsigned short port ) = 0; virtual void Disconnect() = 0; - virtual bool Send(int socket , const char message[]) = 0; - virtual int Recieve( int socket ) = 0; + virtual bool Send( const char message[] ) = 0; + virtual int Recieve(char message[]) = 0; virtual int Listen() = 0; };