FreeMat
vtkSocketController

Section: Visualization Toolkit Parallel Classes

Usage

This is a concrete implementation of vtkMultiProcessController. It supports one-to-one communication using sockets. Note that process 0 will always correspond to self and process 1 to the remote process. This class is best used with ports.

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

  obj = vtkSocketController

Methods

The class vtkSocketController 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 vtkSocketController class.

  • string = obj.GetClassName ()
  • int = obj.IsA (string name)
  • vtkSocketController = obj.NewInstance ()
  • vtkSocketController = obj.SafeDownCast (vtkObject o)
  • obj.Initialize () - Does not apply to sockets. Does nothing.
  • obj.Finalize () - Does not apply to sockets. Does nothing.
  • obj.Finalize (int ) - Does not apply to sockets. Does nothing.
  • obj.SingleMethodExecute () - Does not apply to sockets. Does nothing.
  • obj.MultipleMethodExecute () - Does not apply to sockets. Does nothing.
  • obj.CreateOutputWindow () - Does not apply to sockets. Does nothing.
  • int = obj.WaitForConnection (int port) - Wait for connection on a given port, forwarded to the communicator
  • obj.CloseConnection () - Close a connection, forwarded to the communicator
  • int = obj.ConnectTo (string hostName, int port) - Open a connection to a give machine, forwarded to the communicator
  • int = obj.GetSwapBytesInReceivedData ()
  • obj.SetCommunicator (vtkSocketCommunicator comm) - Set the communicator used in normal and rmi communications.
  • vtkMultiProcessController = obj.CreateCompliantController () - FOOLISH MORTALS! Thou hast forsaken the sacred laws of ad-hoc polymorphism when thou broke a critical assumption of the superclass (namely, each process has thine own id). The time frame to fix thy error has passed. Too much code has come to rely on this abhorrent behavior. Instead, we offer this gift: a method for creating an equivalent communicator with correct process id semantics. The calling code is responsible for deleting this controller.