/home/vlg/develop/libASSA/libassa/assa/Socketbuf.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 //------------------------------------------------------------------------------
00003 // $Id: Socketbuf.h,v 1.3 2005/10/08 02:42:00 vlg Exp $
00004 //------------------------------------------------------------------------------
00005 //                              Socketbuf.h
00006 //------------------------------------------------------------------------------
00007 //  Copyright (C) 1997-2002  Vladislav Grinchenko 
00008 //
00009 //  This library is free software; you can redistribute it and/or
00010 //  modify it under the terms of the GNU Library General Public
00011 //  License as published by the Free Software Foundation; either
00012 //  version 2 of the License, or (at your option) any later version.
00013 //------------------------------------------------------------------------------
00014 #ifndef SOCKET_BUF_H
00015 #define SOCKET_BUF_H
00016 
00017 #include "assa/Streambuf.h"
00018 
00019 namespace ASSA {
00020 
00027 class Socket;
00028 
00029 class Socketbuf : public Streambuf
00030 {
00031 public:
00032     Socketbuf (Socket* s_);
00033     virtual ~Socketbuf ();
00034 
00035 protected:
00036     virtual int  sync ();
00037     virtual int  underflow ();
00038     virtual int  overflow (int c_ = EOF);
00039     virtual int  showmanyc ();
00040     virtual int  doallocate ();
00041 
00042 private:
00043     int  flush_output ();
00044     int  sys_read  (char* b_, int len_);
00045     int  sys_write (char* b_, int len_);
00046     void xput_char (char c_);
00047 
00048 private:
00051     Socket* m_s;
00052 };
00053 
00054 } // end namespace ASSA
00055 
00056 #endif /* SOCKET_BUF_H */  

Generated on Sun Aug 13 15:08:00 2006 for libassa by  doxygen 1.4.6