PDA

View Full Version : Unix Sockets



prvindia
03-06-2003, 12:24 AM
Hello everybody,

I have written a 'C' code for communication between Unix Sockets and Java Sockets(applet). When I try to send data from Java to Unix, it works fine and the reverse is not possible. The applet gets hung when I try to send data from Unix to Windows (java applet). I use Telnet for Unix. Suggestions and ideas are invited.

Venkat.

prvindia
03-10-2003, 09:12 AM
Actually I use Windows 2000 as my platform. I use telnet to connect to my remote Linux Server. I use telnet and the java applet in the same system.

I think Mr.Fred can understand it now.

prvindia
03-10-2003, 09:34 AM
// write(soc,data,20);

/* if(send(soc,str,n,0) < 0)
{
perror("ERROR SENDING DATA");
exit(11);
} */


I have pasted the code (where the problem is). I tried using write as well as send calls. But the data does not reach the Applet.

Hammer
03-10-2003, 09:41 AM
So, what does send() return? Does the perror() print or not?

Does the data get sent over the socket, have you tried an IP trace? Is the applet receiving the data, but ignoring it because the format is bad? What other debugging have you done?

prvindia
03-11-2003, 08:48 AM
perror() does not print anything.

How to trace the data? I need your kind help.

when I send the data, the applet hangs.

prvindia
03-11-2003, 09:16 AM
Thanks for your kind advice. I will try out the things specified by you. Thanks for your information friend.