[vtkusers] Java Data streaming query

Christopher M. Navarro cnavarro at ncsa.uiuc.edu
Fri Oct 24 14:34:04 EDT 2003


Hi Ian,

> But... how do you send the polydata across? Is there any support in VTK, 
> or do I simply have to copy the polydata to a buffer, send the buffer & 
> rebuild the data on the client?

If you look at vtkSocketCommunicator, and more specifically the examples 
SocketServer.cxx and SocketClient.cxx this should give you an idea about 
how you can send vtkDataObject's over a socket.  It would look something 
like:

Server side: 

  if(!comm->Send(myPolyData, 1, 9)) {
    // error sending data, handle appropriately
  }

Client side:

  if(!comm->Receive(myPolyData, 1, 9)) {
    // we didn't receive the data
  }
  
regards,

chris
	




More information about the vtkusers mailing list