FreeMat: vtkServerSocket

FreeMat

- Main Page
- Related Pages

vtkServerSocket

Section: Visualization Toolkit Common Classes

# Usage

To create an instance of class vtkServerSocket, simply invoke its constructor as follows

      obj = vtkServerSocket

# Methods

The class vtkServerSocket has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, `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.