VTK
|
Encapsulate a socket that accepts connections. More...
#include <vtkServerSocket.h>
Public Types | |
typedef vtkSocket | Superclass |
![]() | |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkServerSocket * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
int | CreateServer (int port) |
vtkClientSocket * | WaitForConnection (unsigned long msec=0) |
![]() | |
vtkSocket * | NewInstance () 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 vtkServerSocket * | New () |
static int | IsTypeOf (const char *type) |
static vtkServerSocket * | SafeDownCast (vtkObjectBase *o) |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkSocket * | SafeDownCast (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 |
![]() | |
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 | |
![]() | |
int | SocketDescriptor |
Encapsulate a socket that accepts connections.
Definition at line 28 of file vtkServerSocket.h.
typedef vtkSocket vtkServerSocket::Superclass |
Definition at line 32 of file vtkServerSocket.h.
|
protected |
Returns the port on which the server is running.
|
protected |
Returns the port on which the server is running.
|
static |
|
static |
|
virtual |
Reimplemented from vtkSocket.
|
static |
|
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.