CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

netman.h

00001 
00002 /*
00003     (C) 2002 Mat Sutcliffe <oktal@gmx.co.uk>
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public
00016     License along with this library; if not, write to the Free
00017     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018 */
00019 
00020 #ifndef __CS_INETWORK_NETMAN_H__
00021 #define __CS_INETWORK_NETMAN_H__
00022 
00023 #include "csutil/scf.h"
00024 
00025 struct iNetworkSocket2;
00026 class csDataStream;
00027 
00028 SCF_VERSION (iNetworkPacket, 0, 0, 2);
00029 
00038 struct iNetworkPacket : public iBase
00039 {
00048   virtual bool Read (csDataStream &data, iNetworkSocket2 *socket) = 0;
00049 
00053   virtual char* Write (size_t &length) = 0;
00054 
00058   virtual iNetworkPacket* New () = 0;
00059 
00064   virtual bool FilterSocket (iNetworkSocket2 *) = 0;
00065 };
00066 
00067 SCF_VERSION (iNetworkManager, 0, 0, 1);
00068 
00078 struct iNetworkManager : public iBase
00079 {
00081   virtual void RegisterConnectedSocket
00082     (iNetworkSocket2 *, iNetworkPacket *) = 0;
00083 
00085   virtual bool UnregisterConnectedSocket (iNetworkSocket2 *) = 0;
00086 
00088   virtual void RegisterListeningSocket
00089     (iNetworkSocket2 *, iNetworkPacket *) = 0;
00090 
00092   virtual bool UnregisterListeningSocket (iNetworkSocket2 *) = 0;
00093 
00095   virtual bool Send (iNetworkSocket2 *, iNetworkPacket *) = 0;
00096 
00099   virtual bool SendToAll (iNetworkPacket *) = 0;
00100 };
00101 
00102 #endif // __CS_INETWORK_NETMAN_H__
00103 

Generated for Crystal Space by doxygen 1.2.14