2013-11-19 12:38:13 +01:00
|
|
|
//////////////////////////////////
|
|
|
|
// Created by Sam Svensson 2013 //
|
|
|
|
//////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef NETWORK_DEPENDENCIES_CONNECTION_H
|
|
|
|
#define NETWORK_DEPENDENCIES_CONNECTION_H
|
|
|
|
|
|
|
|
#include "IConnection.h"
|
|
|
|
|
2013-11-21 13:40:52 +01:00
|
|
|
namespace Oyster
|
2013-11-19 12:38:13 +01:00
|
|
|
{
|
2013-11-21 13:40:52 +01:00
|
|
|
namespace Network
|
|
|
|
{
|
|
|
|
class Connection : public IConnection
|
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
Connection() { mySocket = 0; };
|
|
|
|
Connection(int socket) { mySocket = socket; };
|
|
|
|
~Connection();
|
|
|
|
|
|
|
|
virtual bool Connect( unsigned short port , const char serverName[] );
|
2013-11-22 09:17:07 +01:00
|
|
|
virtual bool InitiateServer( unsigned short port );
|
|
|
|
|
2013-11-21 13:40:52 +01:00
|
|
|
virtual void Disconnect();
|
2013-11-22 09:17:07 +01:00
|
|
|
<<<<<<< HEAD
|
2013-11-22 08:56:00 +01:00
|
|
|
virtual bool Send(const unsigned char message[]);
|
|
|
|
virtual int Recieve(char unsigned message[]);
|
2013-11-22 09:17:07 +01:00
|
|
|
=======
|
|
|
|
|
|
|
|
virtual bool Send(const unsigned char message[]);
|
|
|
|
virtual int Recieve(unsigned char message[]);
|
|
|
|
|
|
|
|
>>>>>>> 4142688f6c4a63aa97341205588ad6cace0f43af
|
2013-11-21 13:40:52 +01:00
|
|
|
virtual int Listen();
|
|
|
|
|
|
|
|
private:
|
|
|
|
int mySocket;
|
|
|
|
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
2013-11-19 12:38:13 +01:00
|
|
|
|
|
|
|
#endif
|