VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
vtkServerSocket Class Reference

Encapsulate a socket that accepts connections. More...

#include <vtkServerSocket.h>

Inheritance diagram for vtkServerSocket:
[legend]
Collaboration diagram for vtkServerSocket:
[legend]

Public Types

typedef vtkSocket Superclass
 
- Public Types inherited from vtkSocket
typedef vtkObject Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 
vtkServerSocketNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
int CreateServer (int port)
 
vtkClientSocketWaitForConnection (unsigned long msec=0)
 
- Public Member Functions inherited from vtkSocket
vtkSocketNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
int GetConnected ()
 
void CloseSocket ()
 
int Send (const void *data, int length)
 
int Receive (void *data, int length, int readFully=1)
 
virtual int GetSocketDescriptor ()
 

Static Public Member Functions

static vtkServerSocketNew ()
 
static int IsTypeOf (const char *type)
 
static vtkServerSocketSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkSocket
static int IsTypeOf (const char *type)
 
static vtkSocketSafeDownCast (vtkObjectBase *o)
 
static int SelectSockets (const int *sockets_to_select, int size, unsigned long msec, int *selected_index)
 

Protected Member Functions

virtual vtkObjectBase * NewInstanceInternal () const
 
- Protected Member Functions inherited from vtkSocket
int CreateSocket ()
 
void CloseSocket (int socketdescriptor)
 
int BindSocket (int socketdescriptor, int port)
 
int SelectSocket (int socketdescriptor, unsigned long msec)
 
int Accept (int socketdescriptor)
 
int Listen (int socketdescriptor)
 
int Connect (int socketdescriptor, const char *hostname, int port)
 
int GetPort (int socketdescriptor)
 
 vtkSocket ()
 
 ~vtkSocket ()
 
int GetServerPort ()
 
 vtkServerSocket ()
 
 ~vtkServerSocket ()
 

Additional Inherited Members

- Protected Attributes inherited from vtkSocket
int SocketDescriptor
 

Detailed Description

Encapsulate a socket that accepts connections.

Definition at line 28 of file vtkServerSocket.h.

Member Typedef Documentation

Definition at line 32 of file vtkServerSocket.h.

Constructor & Destructor Documentation

vtkServerSocket::vtkServerSocket ( )
protected

Returns the port on which the server is running.

vtkServerSocket::~vtkServerSocket ( )
protected

Returns the port on which the server is running.

Member Function Documentation

static vtkServerSocket* vtkServerSocket::New ( )
static
static int vtkServerSocket::IsTypeOf ( const char *  type)
static
virtual int vtkServerSocket::IsA ( const char *  type)
virtual

Reimplemented from vtkSocket.

static vtkServerSocket* vtkServerSocket::SafeDownCast ( vtkObjectBase *  o)
static
virtual vtkObjectBase* vtkServerSocket::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkSocket.

vtkServerSocket* vtkServerSocket::NewInstance ( ) const
void vtkServerSocket::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
int vtkServerSocket::CreateServer ( int  port)

Creates a server socket at a given port and binds to it. Returns -1 on error. 0 on success.

vtkClientSocket* vtkServerSocket::WaitForConnection ( unsigned long  msec = 0)

Waits for a connection. When a connection is received a new vtkClientSocket object is created and returned. Returns NULL on timeout.

int vtkServerSocket::GetServerPort ( )

Returns the port on which the server is running.


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