Problem when connecting Java App with C++ App using Windows Socket

Discussion in 'Windows Media Player' started by Kevin LZJ, May 27, 2009.

  1. Kevin LZJ

    Kevin LZJ Guest

    I encounter such a strange problem:
    We have a VC++ Application, which needs to communicate with another Java
    application using socket (in VC++ we use Windows socket indeed). The Java App
    acts as the server and VC++ App as the client. The two works well when
    implement them in the same computer. However, if they are implemented in
    different computers, whether in a LAN or in a WAN (acrossing routers),
    problem encounters: the Java App often reported it detects socket error and
    close the socket (and the connection) which the VC++ client makes, then the
    VC++ client will try to reconnect the Java App again, thus result in such a
    situation, the connection is made, then about 20-30 seconds later, the
    connection is closed, then reconnect,...
    We found that often the Java App detected socket error when it tried to
    write data to the client. if there was no data to write to client, Java won't
    detect the socket error. Of course, the link between the two app is OK.
    We don't know why, the Java App is developed by another company, and we
    don't have much experience in Java so we couldn't give much advice to them.
    However, in our point, we think socket programming model is universal
    acrossing different platforms and different programming languages. Maybe we
    are wrong? If we want to communicate Java App using Windows socket, we need
    to do something special ?


    Kevin Liu
    Kevin LZJ, May 27, 2009
    1. Advertisements

  2. Kevin LZJ


    Aug 27, 2009
    Likes Received:
    Trouble with socket based ipc on vista


    was there any solution for ur problem. We are working on a socket communication between two application (also c++ and java) and we are getting into trouble on vista systems because the socket data isn't transfered in some cases. Can anyone help us with that?

    kind regards,
    TheRebel, Aug 27, 2009
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.