diff options
Diffstat (limited to 'fitsy++/outsocket.h')
-rw-r--r-- | fitsy++/outsocket.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/fitsy++/outsocket.h b/fitsy++/outsocket.h new file mode 100644 index 0000000..6bdcd99 --- /dev/null +++ b/fitsy++/outsocket.h @@ -0,0 +1,38 @@ +// Copyright (C) 1999-2018 +// Smithsonian Astrophysical Observatory, Cambridge, MA, USA +// For conditions of distribution and use, see copyright notice in "copyright" + +#ifndef __outfitssocket_h__ +#define __outfitssocket_h__ + +#include "outfits.h" +#include "zlib.h" + +class OutFitsSocket : public virtual OutFitsStream { + private: + int id_; + + public: + OutFitsSocket(int s); + + int write(char*, size_t); +}; + +class OutFitsSocketGZ : public virtual OutFitsStream { + private: + int id_; + z_stream* stream_; + unsigned char* buf_; + unsigned long crc_; + + int deflategz(int); + void putlong(unsigned long); + + public: + OutFitsSocketGZ(int); + ~OutFitsSocketGZ(); + + int write(char*, size_t); +}; + +#endif |