Unix Sockets

This is a discussion on Unix Sockets within the Linux Programming forums, part of the Platform Specific Boards category; Hello everybody, I have written a 'C' code for communication between Unix Sockets and Java Sockets(applet). When I try to ...

  1. #1
    prvindia
    Guest

    Question Unix Sockets

    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.

  2. #2
    prvindia
    Guest

    Post

    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.

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    3

    Smile

    // 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.

  4. #4
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    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?
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  5. #5
    Registered User
    Join Date
    Mar 2003
    Posts
    3
    perror() does not print anything.

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

    when I send the data, the applet hangs.

  6. #6
    Registered User
    Join Date
    Mar 2003
    Posts
    3

    Smile

    Thanks for your kind advice. I will try out the things specified by you. Thanks for your information friend.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Unix Nonblocking Reads on Sockets
    By winderjj in forum Networking/Device Communication
    Replies: 5
    Last Post: 09-10-2008, 08:17 AM
  2. Unix sockets
    By karas in forum Linux Programming
    Replies: 8
    Last Post: 10-13-2007, 01:20 AM
  3. Difference between Unix sockets and winsock.
    By antex in forum Networking/Device Communication
    Replies: 15
    Last Post: 01-21-2005, 04:53 PM
  4. Winsock vs Unix Sockets
    By khoxxxy in forum Networking/Device Communication
    Replies: 4
    Last Post: 08-05-2003, 06:13 AM
  5. new to unix sockets
    By lithium in forum C Programming
    Replies: 3
    Last Post: 01-20-2003, 05:53 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21