[vtkusers] vtkServerSocket
uzay emir
uzayem at yahoo.com
Mon Dec 8 17:26:08 EST 2008
Hello all,
I'm working on a client-server application. Server tries to receive the data from client.I wrote the following script in order to test but it does not work properly.
Connection is established. However when i try to receive data, after the receiving the first buffer I get an error message.
I could not finid an example related to vtkServerSocket.h. The files that i found are anot utilizing vtkSocketController.h.
And I could not succed tto run vtkServerSocket without initializing the vtkSocketController.
VTK_CREATE(vtkSocketController, contr);
contr->Initialize();
vtkServerSocket *ServerSocket=vtkServerSocket::New();
vtkClientSocket *cs=vtkClientSocket::New();
ServerSocket->CreateServer(11111);
printf("%d",ServerSocket->GetServerPort());
cs=ServerSocket->WaitForConnection(100000);
char datac[scMsgLength];
while (!this->ServerStopFlag){
int r = cs->Receive(&datac, scMsgLength);
}
Any help would be appreciate
Uzay
More information about the vtkusers
mailing list