CrystalSpace

Public API Reference

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

inetwork/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 #if !defined(COMP_VC) && !defined(COMP_BC)
00026 # warning This file is deprecated please use iNetworkSocket
00027 #endif
00028 
00029 SCF_VERSION (iNetworkSocket2, 0, 0, 2);
00030 
00035 struct iNetworkSocket2 : public iBase
00036 {
00042   virtual bool IsConnected () const = 0;
00043 
00045   virtual int LastError() const = 0;
00046 
00052   virtual int SetSocketBlock (bool block) = 0;
00053 
00059   virtual int SetSocketReuse (bool reuse) = 0;
00060 
00066   virtual int SetSocketBroadcast( bool broadcast) = 0;
00067 
00073   virtual int SetBroadcastOptions(int port, const char* addr = 0) = 0;
00078   virtual int Connect (char const* host, int port) = 0; 
00079 
00084   virtual int Send (char const* buff, size_t size) = 0;
00085 
00093   virtual int Recv (char* buff, size_t size) = 0;
00094 
00096   virtual int Close () = 0;
00097 
00099   virtual int Disconnect () = 0;
00100 
00109   virtual int WaitForConnection (int source, int port, int queue) = 0;
00110 
00115   virtual iNetworkSocket2 *Accept () = 0;
00116 
00123   virtual int ReadLine (char *buff, size_t size) = 0;
00124 
00129   virtual char const* RemoteName () const = 0;
00130 };
00131 
00132 #endif // __CS_INETWORK_SOCKET2_H__

Generated for Crystal Space by doxygen 1.2.18