fix Win32 errors, warnings

This commit is contained in:
Chris Danford
2004-03-17 07:45:52 +00:00
parent c318c78a8e
commit 36b557bac2
4 changed files with 9 additions and 7 deletions
+2 -2
View File
@@ -32,7 +32,7 @@ NetworkSyncManager::~NetworkSyncManager ()
delete NetPlayerClient;
}
int NetworkSyncManager::Connect(char * addy, int port)
int NetworkSyncManager::Connect(char * addy, unsigned short port)
{
if (port!=8765)
return -1;
@@ -48,7 +48,7 @@ int NetworkSyncManager::Connect(char * addy, int port)
NetPlayerClient->create(); //Initilize Socket
if(!NetPlayerClient->connect(addy,port)) {
useSMserver = -1; //If connection to socket fails, tell
useSMserver = false; //If connection to socket fails, tell
//other network functions to not do anything
} else {
useSMserver = 1; //Utilize other network funtions
+1 -1
View File
@@ -28,7 +28,7 @@ public:
void StartRequest(); //Request a start. Block until granted.
int Connect(char * addy, int port);
int Connect(char * addy, unsigned short port);
//Connect to SM Server
int m_playerID; //these are currently unused, but need to stay
+4 -2
View File
@@ -1,3 +1,4 @@
#include "global.h"
/*******************************************
ezsockets.cpp -- Header for sockets.cpp
Designed by Josh Allen and Charles
@@ -49,7 +50,7 @@ int EzSockets::create() {
return (true);
}
bool EzSockets::bind(int port) {
bool EzSockets::bind(unsigned short port) {
if (!check()) {
return false;
@@ -73,6 +74,7 @@ bool EzSockets::listen() {
}
return true;
}
typedef int socklen_t;
bool EzSockets::accept(EzSockets &socket) {
@@ -255,7 +257,7 @@ bool EzSockets::sendData(char data[1024], int size) {
return true;
}
bool EzSockets::connect(std::string host, int port) {
bool EzSockets::connect(std::string host, unsigned short port) {
if (!check()) {
return false;
}
+2 -2
View File
@@ -55,7 +55,7 @@ class EzSockets {
//Crate the socket
int create();
//Bind Socket to local port
bool bind(int port);
bool bind(unsigned short port);
//Listen with socket
bool listen();
//Accept incomming socket
@@ -72,7 +72,7 @@ class EzSockets {
bool send(int x);
//Connect to remote host
//NOTE: YOU MUST PUT IN IP, NOT NAME
bool connect(std::string host, int port);
bool connect(std::string host, unsigned short port);
long uAddr();
//Kill socket