Section: Visualization Toolkit Common Classes
To create an instance of class vtkServerSocket, simply invoke its constructor as follows
obj = vtkServerSocket
obj
is an instance of the vtkServerSocket class.
string = obj.GetClassName ()
int = obj.IsA (string name)
vtkServerSocket = obj.NewInstance ()
vtkServerSocket = obj.SafeDownCast (vtkObject o)
int = obj.CreateServer (int port)
- Creates a server socket at a given port and binds to it.
Returns -1 on error. 0 on success.
vtkClientSocket = obj.WaitForConnection (long msec)
- Waits for a connection. When a connection is received
a new vtkClientSocket object is created and returned.
Returns NULL on timeout.
int = obj.GetServerPort ()
- Returns the port on which the server is running.