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...
Type: Posts; User: Spicyfish
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...
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...
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...
Thanks for all the help but I simply can't get this working, gonna go turn into the hulk now
Well I'm not sure what you're getting at, the code I wrote and posted is how I interpreted what you've said.
Sorry to bug you again, I'm just unsure on how to do it
java.net.BindException: Address already in use: JVM_Bind
at java.net.DualStackPlainSocketImpl.bind0(Native Method)
at...
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.
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
...
Ah awesome, I sort of understand, i'll give it a go, thanks for the help!
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...