[Fwd: RE: [Fwd: [IGSTK-Users] Connection lost using igstk:SocketCommunication]]
Vincent Gratsac
vgratsac at irisa.fr
Thu Jul 12 12:13:16 EDT 2007
Hi Patrick,
First of all, many thanks for your help !
In fact, I realized that I got a timeout error because I was trying to
send a simple 'unsigned char' and I did it uncorrectly.
When I was trying to send a 'string' message, all was OK.
So I found a way to send only this simple character (it is important
that the message has a one byte size) and it works correctly now.
Thank you and have a nice day !
Vincent Gratsac
Patrick Cheng wrote:
>
>
> -------- Original Message --------
> Subject: RE: [Fwd: [IGSTK-Users] Connection lost using
> igstk:SocketCommunication]
> Date: Wed, 11 Jul 2007 10:15:38 -0700
> From: Hui Zhang <hzhang at accuray.com>
> To: Patrick Cheng <cheng at isis.georgetown.edu>
> CC: <vgratsac at irisa.fr>
>
> Hi, Patrick,
>
> Everything is great here, but recently is pretty busy with product
> release.
>
> As to the socket communication time out problem, from the description,
> I guess it is due to that the server shuts down the communication for
> some reason after establishing the connection. We use the socket
> communication class in the deck of cards robot and it works well.
>
> To keep sending some packets may help the connection in this case.
> This function should not be inside the core class, because some other
> server/client may not allow those additional packets. He can derive
> his own class to add a utility function to send those packets
> triggered by pulse generator.
>
> There are several things you can try.
> 1. Use RequestRead functions before the RequestWrite to see if there
> are some 'stuck' packets there;
> 2. In test code for socketcommunication class, add a period of waiting
> time between establishing the communication and sending the packets in
> the client code.
>
> It would be helpful to post a snippet of the code to see what happened.
>
> Thanks,
> James
>
> -----Original Message-----
> From: Patrick Cheng [mailto:cheng at isis.georgetown.edu]
> Sent: Wednesday, July 11, 2007 9:45 AM
> To: Hui Zhang
> Subject: [Fwd: [IGSTK-Users] Connection lost using
> igstk:SocketCommunication]
>
> Hi James,
>
> I hope everything is well in Cali. Could you help address these two
> questions on SocketCommunication class?
>
> Thank you,
>
> Patrick
>
> -------- Original Message --------
> Subject: [IGSTK-Users] Connection lost using igstk:SocketCommunication
> Date: Wed, 11 Jul 2007 18:42:19 +0200
> From: Vincent Gratsac <vgratsac at irisa.fr>
> To: igstk-users at public.kitware.com
>
> Hi IGSTK-users,
>
> I'm currently developing a tracker class which will communicate with the
> server through an ethernet connection.
> So I'm using the igstk::SocketCommunication class available in the IGSTK
> SandBox.
> My Tracker class opens the communication and connects to the server, but
> later, when I try to send data (via the RequestWrite method), I get a
> timeout result.
> I tried to send data just after connecting and this time it was a
> success. Thus I conclude that the communication class lost the
> connection.
>
> Here are my questions :
>
> - Currently, what is the state of the igstk::SocketCommunication
> class ? Is it stable and completed ?
> - Is there a way in this class to ensure that the connection will
> not be lost ? Like sending packets frequently in order to save
> connection for example ?
>
> Thank you for your help and have a nice day.
>
> Vincent Gratsac
>
--
Vincent Gratsac
----------------------------------------------------
Unité/Projet VisAGeS U746
INSERM/INRIA/CNRS/U. de Rennes I
IRISA
Campus de Beaulieu, 35042 Rennes Cedex, France
Ph: +33 (0) 2 23 23 49 20/ Fax: +33/0 2 99 84 71 71
email: Vincent.Gratsac at irisa.fr
http://www.irisa.fr/visages/
-----------------------------------------------------
More information about the IGSTK-Users
mailing list