+ 1
6th Jan 2020, 7:28 AM
Sheraz Tariq
Sheraz Tariq - avatar
7 odpowiedzi
+ 1
yes, because if client can't connect server it returns "Connection refused".
6th Jan 2020, 1:30 PM
zemiak
+ 2
look here https://code.sololearn.com/c5Dzb0j6yVGi/#java (if you get only "terminated", try it again)
6th Jan 2020, 1:12 PM
zemiak
0
- run server part first - then run client part from different command line, because .accept() wait and block executing rest of your program. Or do it on another thread.
6th Jan 2020, 10:31 AM
zemiak
0
is this possible in solo learn
6th Jan 2020, 10:32 AM
Sheraz Tariq
Sheraz Tariq - avatar
0
i changed ServerSocket to Socket but it doesn't work
6th Jan 2020, 10:35 AM
Sheraz Tariq
Sheraz Tariq - avatar
0
zemiak you run server class first and then run client class?
6th Jan 2020, 1:16 PM
Sheraz Tariq
Sheraz Tariq - avatar
0
Thanks
6th Jan 2020, 1:34 PM
Sheraz Tariq
Sheraz Tariq - avatar