Search:

Type: Posts; User: Norm

Search: Search took 0.15 seconds.

  1. [SOLVED] Re: can someone help me in this server and multi client

    What value(s) are wrong when two clients are used?
    You need to find the problem when there are more than one client.
  2. [SOLVED] Re: can someone help me in this server and multi client

    Look at the debug print out.
    Does the data that is read match what was written? For example If the client writes a number, does the server read that number?
  3. [SOLVED] Re: can someone help me in this server and multi client

    No, my version does not execute correctly with 2 clients.
  4. [SOLVED] Re: can someone help me in this server and multi client

    Here's a sample of better debug printout. Each Client and HAC has a unique id so their messages can be identified. There is more that needs to be shown, but this is a start.
  5. [SOLVED] Re: can someone help me in this server and multi client

    That debug printout does not say enough about what is happening.
    What value was read for the log?
    What value was written for the message?
    Which client sent the message?
    Which message was received...
  6. [SOLVED] Re: can someone help me in this server and multi client

    Please post the printout that shows when the writes and reads are being done and also shows what (the contents of the data) was written and read.

    The bits and pieces of code that you post are not...
  7. [SOLVED] Re: can someone help me in this server and multi client

    What does the debug printout show about the sequence of the events?
    Is there a write before or at the same time as the read?
  8. [SOLVED] Re: can someone help me in this server and multi client

    No. Just having code in the program does not mean that the code will be executed when it needs to be executed.

    What does the debug print outs show? Does it show there is a write done before...
  9. [SOLVED] Re: can someone help me in this server and multi client

    Where does the code write something to be read?
  10. [SOLVED] Re: can someone help me in this server and multi client

    Does the debug output show that something is being written before the other side tries to read?
  11. [SOLVED] Re: can someone help me in this server and multi client

    Where are the writes being done for those reads?
  12. [SOLVED] Re: can someone help me in this server and multi client

    What does the debug print out show about which program wrote first and which program is trying to read?
    What order does the program need to do the writes and reads in?
  13. [SOLVED] Re: can someone help me in this server and multi client

    Post the debug println output that shows what happens.

    There should be a line printed for all the events in the program. Before and after all reads and writes showing what was read and what was...
  14. [SOLVED] Re: can someone help me in this server and multi client

    Where does the server write what the client is trying to read? Does the debug output show that the server has written something for the client to read? If the server hasn't written something for...
  15. [SOLVED] Re: can someone help me in this server and multi client

    Where does the code in the first client have the problem? Is it waiting to read something or what do you mean by "unable to use"?
    What is the last statement that the code executes in the client...
  16. [SOLVED] Re: can someone help me in this server and multi client

    The code still is trying to do too much in the listener. The listener needs to do some job and return as quickly as possible. If the code in the listener takes too long it will hang the GUI.
    Move...
  17. [SOLVED] Re: can someone help me in this server and multi client

    Can you post the current version of the code for testing?
  18. [SOLVED] Re: can someone help me in this server and multi client

    can you post the debug output that shows what you are talking about?
    The writes and reads must match. When one side writes a value the other side must read that value.
  19. [SOLVED] Re: can someone help me in this server and multi client

    Here is a sample of how to use println statements for debugging:

    System.out.println(name +" C - reading1");
    log = fromServer.readInt();
    ...
  20. [SOLVED] Re: can someone help me in this server and multi client

    Move code out of the listener so that the read does not hang the GUI. Put the code that does a read on its own thread so the listener code can return immediately and release the GUI's thread.

    ...
  21. [SOLVED] Re: can someone help me in this server and multi client

    The code I posted should not be in either the server or the client classes. It should be in its own class.
  22. [SOLVED] Re: can someone help me in this server and multi client

    How are you using the driver I posted? It starts one server and two clients.

    The code needs lots of printlns to show you what it is doing.
  23. [SOLVED] Re: can someone help me in this server and multi client

    To debug this code you need to add lots of println statements that shows what the code is doing.

    I use this driver so that all the output is in one console and the order of events can easily be...
  24. [SOLVED] Re: can someone help me in this server and multi client

    Is there anything to read there?


    Can you post the debug output from the program that shows what it does and explain what the problem is and say what the code should do?

    The posted code is not...
  25. [SOLVED] Re: can someone help me in this server and multi client

    Try debugging the code by adding lots of println statements that print out messages to show execution flow and the values of variables as the code executed. Seeing what the computer sees when it...
Results 1 to 25 of 25