CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1

    Java - C++ socket communication

    Is it possible to communicate between a java application and a c++ application though sockets??



  2. #2
    Join Date
    Mar 2000
    Location
    Kaysville, UT
    Posts
    228

    Re: Java - C++ socket communication

    It is possible, and I have done it several times. I don't know if it's possible in *all* cases. In my case the C++ application was listening on a port for incoming serialized data. The key here was that I had to figure out ahead of time the format that the C++ app expected the data in. I then wrote a Java app that could take the data I wanted to send and converted it to the correct format.

    After that it was easy. Using java.comm I created a socket that connected to the port that the C++ app was listening on. My java application then wrote data to the port.

    Let me know if you have any specific questions.

    "There's nothing more dangerous than a resourceful idiot." ---Dilbert
    BWAHAHAHAHAHAHA! ---Murray

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured