Hey guys!
I have made a topic here in the past regarding server and how to connect to one using java programs i'm coding.
So i have made the following codes:
Server: (Click to View)
Client: (Click to View)
I have a few questions i would love to get some help and guidance with!
Thanks for the help! it is very appreciated <3
I have made a topic here in the past regarding server and how to connect to one using java programs i'm coding.
So i have made the following codes:
Server: (Click to View)
Client: (Click to View)
I have a few questions i would love to get some help and guidance with!
- Which web host i can upload the "Server" jar\class to make it run online?
- Is there any importance to which port to choose? if so, how to choose a port? because i just used a random port used in an explanation i found.
- How to make sure the server wont stop searching for requests?
because now if i run Server and then Client on the IDE both send a message&answer then closes. even if i remove the socket.close(); command on the Server.
should i recursivly call the Server constructor at the end of it? so it will initialize a new socket and wait for a new connetion?
is it a dumb idea or there's better ways of doing it?
- How can i get the IP of the client's socket? i tried to print it out for debugging purposes but didn't find a function to do access it and do so.
Thanks for the help! it is very appreciated <3
Good deeds make a long distance.


