Danbias/Code/Network/NetworkDependencies/IConnection.h

28 lines
690 B
C
Raw Normal View History

#ifndef NETWORK_DEPENDENCIES_I_CONNECTION_H
#define NETWORK_DEPENDENCIES_I_CONNECTION_H
2013-11-19 12:38:13 +01:00
//////////////////////////////////
// Created by Sam Svensson 2013 //
//////////////////////////////////
namespace Oyster
2013-11-19 12:38:13 +01:00
{
namespace Network
{
class OysterByte;
class IConnection
{
public:
2013-11-26 13:45:03 +01:00
virtual int Disconnect() = 0;
2013-11-27 11:28:11 +01:00
virtual int Send( OysterByte& bytes ) = 0;
virtual int Recieve( OysterByte& bytes) = 0;
2013-11-26 13:45:03 +01:00
virtual int InitiateServer( unsigned short port ) { return false; };
virtual int InitiateClient() { return false; };
virtual int Listen() { return -1; };
2013-11-26 13:45:03 +01:00
virtual int Connect( unsigned short port, const char serverName[] ) { return false; };
};
}
}
2013-11-19 12:38:13 +01:00
#endif