Search:

Type: Posts; User: Spicyfish

Search: Search took 0.26 seconds.

  1. Replies
    21
    Views
    1,732

    Re: Multithreading / Multiple Connections

    Wow sweet I got it working, I realise what you meant now, I was getting confused with returning a ServerSocket and a Socket. I just read on the Oracle docs that accept() returns "Socket", changed my...
  2. Replies
    21
    Views
    1,732

    Re: Multithreading / Multiple Connections

    while true
    wait for a connection
    connection found
    create a thread
    wait for a connection
    ....

    That's what I expect it to do? I've never written pseudo code, I actually just Googled it and...
  3. Replies
    21
    Views
    1,732

    Re: Multithreading / Multiple Connections

    I understand it as follows:

    Listens for a connection
    Creates a thread and passes the socket

    Think its a problem with my Server because its using the accept command as well and still using the...
  4. Replies
    21
    Views
    1,732

    Re: Multithreading / Multiple Connections

    Thanks for all the help but I simply can't get this working, gonna go turn into the hulk now
  5. Replies
    21
    Views
    1,732

    Re: Multithreading / Multiple Connections

    Well I'm not sure what you're getting at, the code I wrote and posted is how I interpreted what you've said.
  6. Replies
    21
    Views
    1,732

    Re: Multithreading / Multiple Connections

    Sorry to bug you again, I'm just unsure on how to do it
  7. Replies
    21
    Views
    1,732

    Re: Multithreading / Multiple Connections

    java.net.BindException: Address already in use: JVM_Bind
    at java.net.DualStackPlainSocketImpl.bind0(Native Method)
    at...
  8. Replies
    21
    Views
    1,732

    Re: Multithreading / Multiple Connections

    Its not that its not working, its running fine with no errors. For some reason it just waits for all of the clients to send a command before responding.
  9. Replies
    21
    Views
    1,732

    Re: Multithreading / Multiple Connections

    Hi again,

    I've managed to get it to handle multiple connections however its not responding to the clients until all open clients have entered their command to the server.

    ServerHandler
    ...
  10. Replies
    21
    Views
    1,732

    Re: Multithreading / Multiple Connections

    Ah awesome, I sort of understand, i'll give it a go, thanks for the help!
  11. Replies
    21
    Views
    1,732

    Multithreading / Multiple Connections

    Hi all,

    As part of my assessment I've got to make a client and server which can relay commands and responses between each other. I've managed to get everything working but I'd like to make it...
Results 1 to 11 of 11