Results 1 to 3 of 3
  1. #1
    tryit0704 is offline Member
    Join Date
    Aug 2008
    Posts
    1
    Rep Power
    0

    Default Communicating Java Server and C client using char buffer

    Hello,

    I have a C server which writes char string to buffer
    char buffer[3000]="message=1|Value=1|a="Hello"|b=2|c="How are u"

    There is a java server listening for this on socket

    Q.1 Can i directly use java and C communicate on socket for this char string

    After recieving this message java will do some processing and give response to C client

    Q2. Can java send such character string message as response to C client so that java server and C Client can communicate directly on Socket apart from using JNI

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,331
    Rep Power
    25

    Default

    Any two programs should be able to communicate via a socket as long as they understand the format of the data they are sending/receiving.

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Only thing to do is, format the data packet(buffer actually) correctly which the server can correctly. Or else you have do modifications on either side. That's what Norm trying to explain.

Similar Threads

  1. Server not able to connect client
    By Kapil Gupta in forum New To Java
    Replies: 15
    Last Post: 07-22-2008, 04:09 AM
  2. Replies: 0
    Last Post: 04-04-2008, 02:49 PM
  3. Identify Client in Socket Client Server Application
    By masadjie in forum Networking
    Replies: 1
    Last Post: 12-20-2007, 09:18 AM
  4. Communicating with JSP and popup
    By nilz in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 11-20-2007, 04:29 PM
  5. Replies: 1
    Last Post: 07-14-2007, 05:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •