00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _DECAF_INTERNAL_NET_TCP_TCPSOCKETOUTPUTSTREAM_H_
00019 #define _DECAF_INTERNAL_NET_TCP_TCPSOCKETOUTPUTSTREAM_H_
00020
00021 #include <decaf/util/Config.h>
00022
00023 #include <decaf/io/OutputStream.h>
00024
00025 namespace decaf {
00026 namespace internal {
00027 namespace net {
00028 namespace tcp {
00029
00030 class TcpSocket;
00031
00037 class DECAF_API TcpSocketOutputStream: public decaf::io::OutputStream {
00038 private:
00039
00040 TcpSocket* socket;
00041 volatile bool closed;
00042
00043 private:
00044
00045 TcpSocketOutputStream(const TcpSocketOutputStream&);
00046 TcpSocketOutputStream& operator=(const TcpSocketOutputStream&);
00047
00048 public:
00049
00056 TcpSocketOutputStream(TcpSocket* socket);
00057
00058 virtual ~TcpSocketOutputStream();
00059
00060 virtual void close();
00061
00062 protected:
00063
00064 virtual void doWriteByte(unsigned char c);
00065
00066 virtual void doWriteArrayBounded(const unsigned char* buffer, int size, int offset, int length);
00067
00068 };
00069
00070 }}}}
00071
00072 #endif