Windows build fix

This was SVN commit r7624.
This commit is contained in:
Ykkrosh 2010-06-08 18:58:03 +00:00
parent dfb10c8209
commit 0172c99b93
2 changed files with 11 additions and 11 deletions

View File

@ -68,7 +68,7 @@ bool CNetHost::Create()
// Name: Create()
// Desc: Creates a server host
//-----------------------------------------------------------------------------
bool CNetHost::Create(uint port, uint maxPeers)
bool CNetHost::Create(u16 port, size_t maxPeers)
{
ENetAddress addr;
@ -116,7 +116,7 @@ void CNetHost::Shutdown()
// Desc: Connects to the specified remote host
// Note: Only clients use this method for connection to server
//-----------------------------------------------------------------------------
bool CNetHost::Connect(const CStr& host, uint port)
bool CNetHost::Connect(const CStr& host, u16 port)
{
debug_assert(m_Host);
@ -176,7 +176,7 @@ bool CNetHost::Connect(const CStr& host, uint port)
// Desc: Connects to the specified remote host
// Note: Only clients use this method for connection to server
//-----------------------------------------------------------------------------
bool CNetHost::ConnectAsync(const CStr& host, uint port)
bool CNetHost::ConnectAsync(const CStr& host, u16 port)
{
debug_assert(m_Host);
@ -448,16 +448,16 @@ bool CNetHost::HandleMessageReceive(CNetMessage* pMessage, CNetSession* pSession
// Name: GetSessionCount()
// Desc: Returns the number of sessions the host manages
//-----------------------------------------------------------------------------
uint CNetHost::GetSessionCount() const
size_t CNetHost::GetSessionCount() const
{
return (uint)m_PeerSessions.size();
return m_PeerSessions.size();
}
//-----------------------------------------------------------------------------
// Name: GetSession()
// Desc: Rteurns the session for the index
//-----------------------------------------------------------------------------
CNetSession* CNetHost::GetSession(uint index)
CNetSession* CNetHost::GetSession(size_t index)
{
// Validate parameter
if (index >= GetSessionCount())

View File

@ -52,7 +52,7 @@ public:
virtual ~CNetHost();
bool Create();
bool Create(uint port, uint maxPeers);
bool Create(u16 port, size_t maxPeers);
void Shutdown();
/**
@ -67,7 +67,7 @@ public:
*
* @return The number of sessions
*/
uint GetSessionCount() const;
size_t GetSessionCount() const;
/**
* Returns the session object for the specified index
@ -75,7 +75,7 @@ public:
* @param index Index for session
* @return Session object for index or NULL if not found
*/
CNetSession* GetSession(uint index);
CNetSession* GetSession(size_t index);
/**
* Connects to foreign host synchronously
@ -84,7 +84,7 @@ public:
* @param port Port on which the foreign host listens
* @return true on success, false on failure
*/
bool Connect(const CStr& host, uint port);
bool Connect(const CStr& host, u16 port);
/**
* Connects to foreign host asynchronously (i.e. without waiting for the connection
@ -94,7 +94,7 @@ public:
* @param port Port on which the foreign host listens
* @return true on success, false on failure
*/
bool ConnectAsync(const CStr& host, uint port);
bool ConnectAsync(const CStr& host, u16 port);
/**
* Disconnects session from host