26#include "vtkCommonSystemModule.h"
52 int Send(
const void* data,
int length);
62 int Receive(
void* data,
int length,
int readFully = 1);
68 vtkGetMacro(SocketDescriptor,
int);
76 const int* sockets_to_select,
int size,
unsigned long msec,
int* selected_index);
124 int Connect(
int socketdescriptor,
const char* hostname,
int port);
134 void operator=(
const vtkSocket&) =
delete;
a simple class to control print indentation
abstract base class for most VTK objects
a collection for sockets.
BSD socket encapsulation.
void CloseSocket()
Close the socket.
int CreateSocket()
Creates an endpoint for communication and returns the descriptor.
static int SelectSockets(const int *sockets_to_select, int size, unsigned long msec, int *selected_index)
Selects set of sockets.
int Accept(int socketdescriptor)
Accept a connection on a socket.
int SelectSocket(int socketdescriptor, unsigned long msec)
Selects a socket ie.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int Listen(int socketdescriptor)
Listen for connections on a socket.
int GetConnected()
Check is the socket is alive.
void CloseSocket(int socketdescriptor)
Close the socket.
int BindSocket(int socketdescriptor, int port)
Binds socket to a particular port.
int GetPort(int socketdescriptor)
Returns the port to which the socket is connected.
int Connect(int socketdescriptor, const char *hostname, int port)
Connect to a server socket.
int Receive(void *data, int length, int readFully=1)
Receive data from the socket.
int Send(const void *data, int length)
These methods send data over the socket.