Search:

Type: Posts; User: wuliao123

Page 1 of 2 1 2

Search: Search took 0.27 seconds.

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

    it read correctly but it only correctly only when got one client. so i do not know how to change to program
  2. Re: can someone help me in this server and multi client

    do you know the program got what problem?
  3. Re: can someone help me in this server and multi client

    your straight run 2 client? it run smoothly ?
  4. Re: can someone help me in this server and multi client

    SERVER



    import java.awt.BorderLayout;
    import java.io.DataInputStream;
    import java.io.DataOutputStream;
    import java.io.IOException;
    import java.net.InetAddress;
    import java.net.ServerSocket;
  5. Re: can someone help me in this server and multi client

    Success entering
    reading log
    writing log to the server
    1
    writing message to the server
    message 3
    Success read log from client = 1
    reading msg from client store in allmessage[chatlog]
    read...
  6. Re: can someone help me in this server and multi client

    it show that the server's log = inputFromClient.readInt() read successful then it go to another read (allmessage[chatlog] = inetAddress.getHostName() + "\t" +inputFromClient.readUTF(); ) after...
  7. Re: can someone help me in this server and multi client

    before server and client show they read each other int log = inputFromClient.readInt(); (in the server read successful), but when it come to allmessage[chatlog] = inetAddress.getHostName() + "\t"...
  8. Re: can someone help me in this server and multi client

    at server
    allmessage[chatlog] = inetAddress.getHostName() + "\t" +inputFromClient.readUTF();
    try to read from client's
    toServer.writeUTF(jtfMessage.getText().trim());

    at client
    log =...
  9. Re: can someone help me in this server and multi client

    nope...the last two statement is server and client try to read each other
  10. Re: can someone help me in this server and multi client

    example like the server read the Int from the client so that the server can store the message inside String array at the server .
    and let say if the second client already got input in the server ...
  11. Re: can someone help me in this server and multi client

    the debug show the server read first then followed by client read, then it stop already.
    program is for client to enter the data..then the server read, after read server update the data then give...
  12. Re: can someone help me in this server and multi client

    i not really good at debug but i still try it, i just realize that after the second client run then back to first client to run..it stop at log = fromServer.readInt(); , but the server there is...
  13. Re: can someone help me in this server and multi client

    public void run(){
    try{
    while(true){
    String msgtoreturn = "";
    int log = inputFromClient.readInt();

    ...
  14. Re: can someone help me in this server and multi client

    all client have the same code... when i open one client(first client) the action listener does not have any problem. then i open second client and do the same..the action listener also does have any...
  15. Re: can someone help me in this server and multi client

    jtfMessage.addActionListener(new ActionListener(){
    public void actionPerformed(ActionEvent e){
    try{
    toServer.writeInt(log);
    ...
  16. Re: can someone help me in this server and multi client

    server



    import java.awt.BorderLayout;
    import java.io.DataInputStream;
    import java.io.DataOutputStream;
    import java.io.IOException;
    import java.net.InetAddress;
    import java.net.ServerSocket;
  17. Re: can someone help me in this server and multi client

    erm....i already make changes to my code . that matching problem already solve but it come back to last time problem, the first client read there cannot work after the second client run. The read i...
  18. Re: can someone help me in this server and multi client

    i use println to debug . at server i use writeInt and writeUTF ,client there use readInt and readUTF

    but the value i readInt is different from writeInt when my server there have another writeUTF
  19. Re: can someone help me in this server and multi client

    mind to show me some example?
  20. Re: can someone help me in this server and multi client

    this time,i straight cannot input . it seem like the read cannot be use when got more than one client . what other method can be use ,because i want message to be update when i press enter
  21. Re: can someone help me in this server and multi client

    i replace the main inside client with the driver.
  22. Re: can someone help me in this server and multi client

    Sorry for not able to provide more detail for you all to help me

    i use that driver , it help open so many server. only one server can be use, the rest (java.net.BindException: Address already in...
  23. Re: can someone help me in this server and multi client

    1813

    I was hope that the server will store the input from the client( it store in an String array in the server), when another(second) client it open and have input into the server the server...
  24. Re: can someone help me in this server and multi client

    jtfMessage.addActionListener(new ActionListener(){
    public void actionPerformed(ActionEvent e){
    try{



    toServer.writeInt(log);
    toServer.writeUTF(jtfMessage.getText().trim());
    toServer.flush();
  25. Re: can someone help me in this server and multi client

    sorry for make you all hard to understand . It my first experience to use forum.
    the problem is when i open second client and use it still ok...but then i change back to first client (i hope the...
Results 1 to 25 of 26
Page 1 of 2 1 2