CrystalSpace

Public API Reference

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

socket2.h

00001 /*
00002     ENSOCKET Plugin
00003     Copyright (C) 2002 by Erik Namtvedt
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_SOCKET2_H__
00021 #define __CS_INETWORK_SOCKET2_H__
00022 
00023 #include "csutil/scf.h"
00024 
00025 SCF_VERSION (iNetworkSocket2, 0, 0, 2);
00026 
00031 struct iNetworkSocket2 : public iBase
00032 {
00038   virtual bool IsConnected () const = 0;
00039 
00041   virtual int LastError() const = 0;
00042 
00048   virtual int SetSocketBlock (bool block) = 0;
00049 
00055   virtual int SetSocketReuse (bool reuse) = 0;
00056 
00061   virtual int Connect (char const* host, int port) = 0; 
00062 
00067   virtual int Send (char const* buff, size_t size) = 0;
00068 
00076   virtual int Recv (char* buff, size_t size) = 0;
00077 
00079   virtual int Close () = 0;
00080 
00082   virtual int Disconnect () = 0;
00083 
00092   virtual int WaitForConnection (int source, int port, int queue) = 0;
00093 
00098   virtual iNetworkSocket2 *Accept () = 0;
00099 
00106   virtual int ReadLine (char *buff, size_t size) = 0;
00107 
00112   virtual char const* RemoteName () const = 0;
00113 };
00114 
00115 #endif // __CS_INETWORK_SOCKET2_H__

Generated for Crystal Space by doxygen 1.2.14