2013-11-19 12:38:13 +01:00
|
|
|
//////////////////////////////////
|
|
|
|
// Created by Sam Svensson 2013 //
|
|
|
|
//////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef NETWORK_DEPENDENCIES_I_CONNECTION_H
|
|
|
|
#define NETWORK_DEPENDENCIES_I_CONNECTION_H
|
|
|
|
|
2013-11-19 13:42:50 +01:00
|
|
|
namespace Oyster
|
2013-11-19 12:38:13 +01:00
|
|
|
{
|
2013-11-19 13:42:50 +01:00
|
|
|
namespace Network
|
|
|
|
{
|
|
|
|
class IConnection
|
|
|
|
{
|
2013-11-21 13:40:52 +01:00
|
|
|
|
|
|
|
public:
|
|
|
|
virtual void Disconnect() = 0;
|
|
|
|
virtual bool Send( const char message[] ) = 0;
|
|
|
|
virtual int Recieve(char message[]) = 0;
|
|
|
|
virtual bool InitiateServer( unsigned short port ) { return false; };
|
|
|
|
virtual int Listen() { return -1; };
|
|
|
|
virtual bool Connect( unsigned short port, const char serverName[] ) { return false; };
|
2013-11-19 13:42:50 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
2013-11-19 12:38:13 +01:00
|
|
|
|
|
|
|
#endif
|