Hi Dariusz, I guess that the string send back to the root-client is too short, so the soc->Recv() call waits for the remainder. Did you prefix the message send by your C-server with the correct length field (value 4 in your example) and type? Regards, Horst Goeringer Dariusz Miskowiec wrote: > > Dear Rooters, > > I want to build a client-server system with a root-client and a simple > stand-alone server written in C. I can send a message from root-client > to C-server. The server acts by sending back a copy of the client's > message. This message, however, for some reason does not reach the > root-client. > > I learned that root adds 8 bytes (length and type) at the beginning of > each > message and expects the same from the received messages. This should not > cause a problem because the server sends a copy of the client's message. > > Here is my root-client session: > > root [0] gROOT->Reset(); > root [1] TSocket *soc = new TSocket("kp1pck",7777); > root [2] soc->Send("dupa"); > root [3] char str[256]; > root [4] soc->Recv(str,100); > > here root hangs waiting for the answer which never comes. > > Thanks for any hints > Dariusz Miskowiec > > -- > +-------------------------------------------------------------------+ > + Dariusz Miskowiec E-mail: D.Miskowiec@gsi.de + > + GSI, Planckstr. 1 Phone: 0049-6159-712-133 + > + D-64291 Darmstadt Fax: 0049-6159-712-785 + > +-------------------------------------------------------------------+ -- ----------------------------------------------------------------- Dr. Horst Goeringer email: H.Goeringer@gsi.de GSI Computing Center Tel: +49-6159-71-2553 Planckstr. 1 Fax: +49-6159-71-2986 D-64291 Darmstadt, Germany -----------------------------------------------------------------
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:33 MET