openblt

a hobby OS from the late 90s
git clone http://frotz.net/git/openblt.git
Log | Files | Refs | LICENSE

Connection.h (540B)


      1 #ifndef _CONNECTION_H
      2 #define _CONNECTION_H
      3 
      4 class Connection {
      5 public:
      6 	Connection(int sendPort, int receivePort);
      7 	~Connection();
      8 
      9 	int ReadInt32();
     10 	short ReadInt16();
     11 	char ReadInt8();
     12 	void WriteInt32(int);
     13 	void WriteInt16(short);
     14 	void WriteInt8(char);
     15 
     16 	void Write(const void*, int);
     17 	void Flush();
     18 	void EndCommand();
     19 	void Read(void*, int);
     20 	
     21 private:
     22 	void Receive();
     23 
     24 	int fSendPort;
     25 	int fReceivePort;
     26 	char *fSendBuffer;
     27 	char *fReceiveBuffer;
     28 	int fSendBufferSize;
     29 	int fReceiveBufferSize;
     30 	int fReceiveBufferPos;
     31 };
     32 
     33 
     34 #endif