fgms 0.11.8
The
FlightGear MultiPlayer Server
project
netSocket Class Reference

Socket type. More...

#include <netSocket.h>

Public Member Functions

 netSocket ()
 
virtual ~netSocket ()
 
int accept (netAddress *addr)
 
int bind (const char *host, int port)
 
void close (void)
 
int connect (const char *host, int port)
 
int getHandle () const
 
int listen (int backlog)
 
bool open (bool stream=true)
 
int read_char (unsigned char &c)
 
int recv (void *buffer, int size, int flags=0)
 
int recvfrom (void *buffer, int size, int flags, netAddress *from)
 
int send (const void *buffer, int size, int flags=0)
 
int sendto (const void *buffer, int size, int flags, const netAddress *to)
 
void setBlocking (bool blocking)
 
void setBroadcast (bool broadcast)
 
void setHandle (int handle)
 
void setSockOpt (int SocketOption, bool Set)
 
void shutdown (void)
 
int write_char (const char &c)
 
int write_str (const char *str, int len)
 
int write_str (const string &str)
 

Static Public Member Functions

static bool isNonBlockingError ()
 
static int select (netSocket **reads, netSocket **writes, int timeout)
 

Private Attributes

int handle
 
bool isStream
 

Detailed Description

Socket type.

Definition at line 125 of file netSocket.h.

Constructor & Destructor Documentation

netSocket::netSocket ( )

Definition at line 204 of file netSocket.cxx.

netSocket::~netSocket ( )
virtual

Definition at line 211 of file netSocket.cxx.

Member Function Documentation

int netSocket::accept ( netAddress addr)

Definition at line 313 of file netSocket.cxx.

int netSocket::bind ( const char *  host,
int  port 
)

Definition at line 298 of file netSocket.cxx.

void netSocket::close ( void  )
int netSocket::connect ( const char *  host,
int  port 
)

Definition at line 329 of file netSocket.cxx.

Referenced by FG_TRACKER::Connect().

int netSocket::getHandle ( ) const
inline

Definition at line 135 of file netSocket.h.

Referenced by select().

bool netSocket::isNonBlockingError ( )
static

Definition at line 456 of file netSocket.cxx.

int netSocket::listen ( int  backlog)

Definition at line 306 of file netSocket.cxx.

bool netSocket::open ( bool  stream = true)

Definition at line 224 of file netSocket.cxx.

Referenced by FG_TRACKER::Connect().

int netSocket::read_char ( unsigned char &  c)

Definition at line 386 of file netSocket.cxx.

int netSocket::recv ( void *  buffer,
int  size,
int  flags = 0 
)

Definition at line 403 of file netSocket.cxx.

Referenced by FG_TRACKER::TrackerRead().

int netSocket::recvfrom ( void *  buffer,
int  size,
int  flags,
netAddress from 
)

Definition at line 410 of file netSocket.cxx.

int netSocket::select ( netSocket **  reads,
netSocket **  writes,
int  timeout 
)
static

Definition at line 489 of file netSocket.cxx.

Referenced by FG_SERVER::Loop(), and LIBCLI::Client::wait_for_input().

int netSocket::send ( const void *  buffer,
int  size,
int  flags = 0 
)

Definition at line 371 of file netSocket.cxx.

Referenced by LIBCLI::commit(), and FG_TRACKER::TrackerWrite().

int netSocket::sendto ( const void *  buffer,
int  size,
int  flags,
const netAddress to 
)

Definition at line 378 of file netSocket.cxx.

void netSocket::setBlocking ( bool  blocking)

Definition at line 233 of file netSocket.cxx.

Referenced by FG_TRACKER::Connect().

void netSocket::setBroadcast ( bool  broadcast)

Definition at line 277 of file netSocket.cxx.

void netSocket::setHandle ( int  handle)

Definition at line 217 of file netSocket.cxx.

Referenced by FG_SERVER::HandleTelnet().

void netSocket::setSockOpt ( int  SocketOption,
bool  Set 
)

Definition at line 257 of file netSocket.cxx.

void netSocket::shutdown ( void  )

Definition at line 436 of file netSocket.cxx.

int netSocket::write_char ( const char &  c)

Definition at line 366 of file netSocket.cxx.

Referenced by FG_TRACKER::Connect().

int netSocket::write_str ( const char *  str,
int  len 
)

Definition at line 339 of file netSocket.cxx.

Referenced by FG_SERVER::HandleTelnet().

int netSocket::write_str ( const string &  str)

Definition at line 361 of file netSocket.cxx.

Member Data Documentation

int netSocket::handle
private

Definition at line 127 of file netSocket.h.

Referenced by getHandle().

bool netSocket::isStream
private

Definition at line 128 of file netSocket.h.


The documentation for this class was generated from the following files: