mirror of
https://github.com/autc04/Retro68.git
synced 2024-11-24 23:32:06 +00:00
31 lines
549 B
C++
31 lines
549 B
C++
#pragma once
|
|
|
|
#include <Stream.h>
|
|
#include <MacTCP.h>
|
|
|
|
class MacTCPStream : public Stream
|
|
{
|
|
static const long kInputBufferSize = 8192;
|
|
static const long kReadBufferSize = 4096;
|
|
char inputBuffer[kInputBufferSize];
|
|
char readBuffer[kReadBufferSize];
|
|
|
|
short refNum;
|
|
bool connected = false;
|
|
|
|
StreamPtr tcpStream;
|
|
TCPiopb readPB, writePB;
|
|
|
|
void startListening();
|
|
void startReading();
|
|
public:
|
|
virtual void write(const void* p, size_t n) override;
|
|
|
|
void idle();
|
|
|
|
MacTCPStream();
|
|
~MacTCPStream();
|
|
};
|
|
|
|
|