#include <igtlServerSocket.h>
|
static int | SelectSockets (const int *sockets_to_select, int size, unsigned long msec, int *selected_index) |
|
Definition at line 42 of file igtlServerSocket.h.
◆ ConstPointer
◆ Pointer
◆ Self
◆ Superclass
◆ ServerSocket()
igtl::ServerSocket::ServerSocket |
( |
| ) |
|
|
protected |
◆ ~ServerSocket()
igtl::ServerSocket::~ServerSocket |
( |
| ) |
|
|
protected |
◆ Accept()
int igtl::Socket::Accept |
( |
int |
socketdescriptor | ) |
|
|
protectedinherited |
Accept a connection on a socket. Returns -1 on error. Otherwise the descriptor of the accepted socket.
◆ BindSocket()
int igtl::Socket::BindSocket |
( |
int |
socketdescriptor, |
|
|
int |
port |
|
) |
| |
|
protectedinherited |
Binds socket to a particular port. Returns 0 on success other -1 is returned.
◆ BreakOnError()
static void igtl::LightObject::BreakOnError |
( |
| ) |
|
|
staticinherited |
This method is called when igtlExceptionMacro executes. It allows the debugger to break on error.
◆ CloseSocket() [1/2]
void igtl::Socket::CloseSocket |
( |
| ) |
|
|
inlineinherited |
◆ CloseSocket() [2/2]
void igtl::Socket::CloseSocket |
( |
int |
socketdescriptor | ) |
|
|
protectedinherited |
◆ Connect()
int igtl::Socket::Connect |
( |
int |
socketdescriptor, |
|
|
const char * |
hostname, |
|
|
int |
port |
|
) |
| |
|
protectedinherited |
Connect to a server socket. Returns 0 on success, -1 on error.
◆ CreateAnother()
Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.
Reimplemented from igtl::LightObject.
◆ CreateServer()
int igtl::ServerSocket::CreateServer |
( |
int |
port | ) |
|
◆ CreateSocket()
int igtl::Socket::CreateSocket |
( |
| ) |
|
|
protectedinherited |
Creates an endpoint for communication and returns the descriptor. -1 indicates error.
◆ DebugOff()
virtual void igtl::Object::DebugOff |
( |
| ) |
const |
|
virtualinherited |
Turn debugging output off.
◆ DebugOn()
virtual void igtl::Object::DebugOn |
( |
| ) |
const |
|
virtualinherited |
Turn debugging output on.
◆ Delete()
virtual void igtl::LightObject::Delete |
( |
| ) |
|
|
virtualinherited |
Delete an igtl object. This method should always be used to delete an object when the new operator was used to create it. Using the C delete method will not work with reference counting.
◆ GetConnected()
int igtl::Socket::GetConnected |
( |
| ) |
|
|
inlineinherited |
Check is the socket is alive.
Definition at line 75 of file igtlSocket.h.
◆ GetDebug()
bool igtl::Object::GetDebug |
( |
| ) |
const |
|
inherited |
Get the value of the debug flag.
◆ GetGlobalWarningDisplay()
static bool igtl::Object::GetGlobalWarningDisplay |
( |
| ) |
|
|
staticinherited |
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
◆ GetNameOfClass()
virtual const char* igtl::LightObject::GetNameOfClass |
( |
| ) |
const |
|
inlinevirtualinherited |
Return the name of this class as a string. Used by the object factory (implemented in New()) to instantiate objects of a named type. Also used for debugging and other output information.
Definition at line 84 of file igtlLightObject.h.
◆ GetPort()
int igtl::Socket::GetPort |
( |
int |
socketdescriptor | ) |
|
|
protectedinherited |
Returns the port to which the socket is connected. 0 on error.
◆ GetReferenceCount()
virtual int igtl::LightObject::GetReferenceCount |
( |
| ) |
const |
|
inlinevirtualinherited |
◆ GetServerPort()
int igtl::ServerSocket::GetServerPort |
( |
| ) |
|
◆ GetSocketAddressAndPort()
int igtl::Socket::GetSocketAddressAndPort |
( |
std::string & |
address, |
|
|
int & |
port |
|
) |
| |
|
inherited |
◆ GlobalWarningDisplayOff()
static void igtl::Object::GlobalWarningDisplayOff |
( |
| ) |
|
|
inlinestaticinherited |
◆ GlobalWarningDisplayOn()
static void igtl::Object::GlobalWarningDisplayOn |
( |
| ) |
|
|
inlinestaticinherited |
◆ igtlGetMacro()
igtl::Socket::igtlGetMacro |
( |
SocketDescriptor |
, |
|
|
int |
|
|
) |
| |
|
protectedinherited |
◆ igtlNewMacro()
◆ igtlTypeMacro() [1/2]
◆ igtlTypeMacro() [2/2]
Standard part of all igtl objects.
◆ Listen()
int igtl::Socket::Listen |
( |
int |
socketdescriptor | ) |
|
|
protectedinherited |
Listen for connections on a socket. Returns 0 on success. -1 on error.
◆ New()
static Pointer igtl::Object::New |
( |
| ) |
|
|
staticinherited |
Method for creation through the object factory.
◆ Print()
void igtl::LightObject::Print |
( |
std::ostream & |
os | ) |
const |
|
inherited |
Cause the object to print itself out.
◆ PrintHeader()
virtual void igtl::LightObject::PrintHeader |
( |
std::ostream & |
os | ) |
const |
|
protectedvirtualinherited |
Number of uses of this object by other objects.
◆ PrintSelf()
void igtl::ServerSocket::PrintSelf |
( |
std::ostream & |
os | ) |
const |
|
protectedvirtual |
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from igtl::Object.
◆ PrintTrailer()
virtual void igtl::LightObject::PrintTrailer |
( |
std::ostream & |
os | ) |
const |
|
protectedvirtualinherited |
Number of uses of this object by other objects.
◆ Receive()
int igtl::Socket::Receive |
( |
void * |
data, |
|
|
int |
length, |
|
|
int |
readFully = 1 |
|
) |
| |
|
inherited |
Receive data from the socket. This call blocks until some data is read from the socket, unless timeout is set by SetTimeout() or SetReceiveTimeout(). When the readFully flag is set, this call will block until all the requested data is read from the socket. The readFully flag will be ignored if the timeout is active. 0 on error, -1 on timeout, else number of bytes read is returned.
◆ Register()
virtual void igtl::Object::Register |
( |
| ) |
const |
|
virtualinherited |
Return this objects modified time.
Update the modification time for this object. Many filters rely on the modification time to determine if they need to recompute their data.
Increase the reference count (mark as used by another object).
Reimplemented from igtl::LightObject.
◆ SelectSocket()
int igtl::Socket::SelectSocket |
( |
int |
socketdescriptor, |
|
|
unsigned long |
msec |
|
) |
| |
|
protectedinherited |
Selects a socket ie. waits for it to change status. Returns 1 on success; 0 on timeout; -1 on error. msec=0 implies no timeout.
◆ SelectSockets()
static int igtl::Socket::SelectSockets |
( |
const int * |
sockets_to_select, |
|
|
int |
size, |
|
|
unsigned long |
msec, |
|
|
int * |
selected_index |
|
) |
| |
|
staticprotectedinherited |
Selects set of sockets. Returns 0 on timeout, -1 on error. 1 on success. Selected socket's index is returned thru selected_index
◆ Send()
int igtl::Socket::Send |
( |
const void * |
data, |
|
|
int |
length |
|
) |
| |
|
inherited |
These methods send data over the socket. Returns 1 on success, 0 on error and raises vtkCommand::ErrorEvent. SIGPIPE or other signal may be raised on systems (e.g., Sun Solaris) where MSG_NOSIGNAL flag is not supported for the socket send method.
◆ SetDebug()
void igtl::Object::SetDebug |
( |
bool |
debugFlag | ) |
const |
|
inherited |
Set the value of the debug flag. A non-zero value turns debugging on.
◆ SetGlobalWarningDisplay()
static void igtl::Object::SetGlobalWarningDisplay |
( |
bool |
flag | ) |
|
|
staticinherited |
◆ SetReceiveBlocking()
int igtl::Socket::SetReceiveBlocking |
( |
int |
sw | ) |
|
|
inherited |
Set (psuedo) non-blocking mode for recv(). When sw=1, the time out is set to minimum value (1 microsecond in UNIX, 1 millisecond in Windows) for receiving.
◆ SetReceiveTimeout()
int igtl::Socket::SetReceiveTimeout |
( |
int |
timeout | ) |
|
|
inherited |
Set reciving timeout for the existing socket in millisecond. This function should be called after opening the socket.
◆ SetReferenceCount()
virtual void igtl::Object::SetReferenceCount |
( |
int |
| ) |
|
|
virtualinherited |
◆ SetSendBlocking()
int igtl::Socket::SetSendBlocking |
( |
int |
sw | ) |
|
|
inherited |
Set (psuedo) non-blocking mode for recv(). When sw=1, the time out is set to minimum value (1 microsecond in UNIX, 1 millisecond in Windows) for sending.
◆ SetSendTimeout()
int igtl::Socket::SetSendTimeout |
( |
int |
timeout | ) |
|
|
inherited |
Set sending timeout for the existing socket in millisecond. This function should be called after opening the socket.
◆ SetTimeout()
int igtl::Socket::SetTimeout |
( |
int |
timeout | ) |
|
|
inherited |
Set sending/receiving timeout for the existing socket in millisecond. This function should be called after opening the socket.
◆ Skip()
int igtl::Socket::Skip |
( |
int |
length, |
|
|
int |
skipFully = 1 |
|
) |
| |
|
inherited |
Skip reading data from the socket. The Skip() call has been newly introduced to the igtlSocket, after the class is imported from VTK, thus the call is not available in vtkSocket class.
◆ UnRegister()
virtual void igtl::Object::UnRegister |
( |
| ) |
const |
|
virtualinherited |
Decrease the reference count (release by another object).
Reimplemented from igtl::LightObject.
◆ WaitForConnection()
◆ m_ReferenceCount
volatile int igtl::LightObject::m_ReferenceCount |
|
mutableprotectedinherited |
◆ m_ReferenceCountLock
|
mutableprotectedinherited |
Mutex lock to protect modification to the reference count
Definition at line 134 of file igtlLightObject.h.
◆ m_SocketDescriptor
int igtl::Socket::m_SocketDescriptor |
|
protectedinherited |
The documentation for this class was generated from the following file: