Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

netbuffer.h

Go to the documentation of this file.
00001 /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*-
00002    this file is part of rcssserver3D
00003    Fri May 9 2003
00004    Copyright (C) 2003 Koblenz University
00005    $Id: netbuffer.h,v 1.2 2004/04/30 13:07:55 fruit Exp $
00006 
00007    This program is free software; you can redistribute it and/or modify
00008    it under the terms of the GNU General Public License as published by
00009    the Free Software Foundation; version 2 of the License.
00010 
00011    This program is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014    GNU General Public License for more details.
00015 
00016    You should have received a copy of the GNU General Public License
00017    along with this program; if not, write to the Free Software
00018    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00019 */
00020 #ifndef OXYGEN_NETBUFFER_H
00021 #define OXYGEN_NETBUFFER_H
00022 
00023 #include <rcssnet/addr.hpp>
00024 
00025 namespace oxygen
00026 {
00027 
00032 class NetBuffer
00033 {
00034 public:
00035     NetBuffer() {};
00036     NetBuffer(rcss::net::Addr addr, const std::string& data)
00037         : mAddr(addr), mData(data) {}
00038 
00040     void AddFragment(const std::string& d);
00041 
00043     bool IsEmpty() const;
00044 
00046     const rcss::net::Addr& GetAddr() const;
00047 
00049     std::string& GetData();
00050 
00051 protected:
00053     rcss::net::Addr mAddr;
00054 
00056     std::string mData;
00057 };
00058 
00059 } // namespace oxygen
00060 
00061 #endif // OXYGEN_NETBUFFER_H

Generated on Thu Apr 6 15:25:39 2006 for rcssserver3d by  doxygen 1.4.4