I just wanted to say thank you so much! My professor just kind of threw us to the wolves with socket programming. You're the real teacher! Food for thought: if you were to create some merch I would definitely buy + support!! Also, a part 5 would be amazingggg
@joanaluis6086
5 ай бұрын
Like all the previous comments of desperate CS students: I have seen dozen of videos about the topic but your playlist offered the most concise and clear explanation. Thank you for being a legend David!
@pl8yr
4 жыл бұрын
David Dobervich just wanna say thank you for the tutorial of programming the client-server architecture - your four-step video has helped me completely understand what I would like to implement in my chat application coursework when implementing multithreading, I understood the basic part, yet didn't understand what the purpose of multithreading is and you have literally cleared my understanding of its use. Thank you again and hope many others take notice of this video because it was very useful.
@simoneglatzeder9826
4 жыл бұрын
Bro, I study information systems and am currently struggling really bad with my programming exercises, if I watched this at the beginning of this day I wouldve saved about 8 hours of my time, trying to figure this out XD thx!!!!!!
@boohda1995
3 жыл бұрын
if you played around for 8 hours instead of using google in an efficient way... than you maybe shouldn't study anything computer related.
@lovesofa
3 жыл бұрын
@@boohda1995 Hey! The IT community called and said they don't like your attitude. :) It just so happens that anybody can do ANYTHING they put their mind to. So you could mind your business and keep your head in the books! I mean we all ended up right here on THIS VERY youtube video after all. ;)
@RaVeN-fv7yh
2 жыл бұрын
Thank you sooooooooo much, I'm just at loss of words, you saved my ass. Our professor gave this us as our coursework and I didnt get a single thing on socket programming. Really grateful for you! Sunscribed and I shared this video with my colleagues.
@igothisoncamera7205
2 жыл бұрын
straight to the point! Thank you for this brief and concise explanation
@davideferrara6274
13 күн бұрын
Amazing video, thanks!
@vincinoyb9734
3 жыл бұрын
I found this a great tutorial series, watched them all 4 and learned a lot besides socket programming (and still searching how you are able to run the program from clicking left in a separate console window, each :-)) I really hope you find some time for a part 5 in which you handle the possibly unclosed or occupied port things, limiting the actual number of connections to the server instead of a "connected but not served" state (prevents using unnecessary sever resources). Also countermeasures against vandalism (hackers occupying computer (server) resources) would be an interesting topic. Other things i can think of is encrypted communications just to name some things in case you have trouble finding inspiration 😁 But please keep making these videos!!
@swappy4515
3 жыл бұрын
Thank you so much.. I was need this like nobody wants I iterate this client server architecture in my mini project of java Thanks a lot🙏
@duskfern9041
4 жыл бұрын
Is there anywhere where i can grab the source code too see it for myself? Github or something maybe? Just easier when im checking my own code to see this one rather than having to skim through the video.
@markokroselj7
4 жыл бұрын
Thank you so much, for this tutorial! You really helped me a lot. ❤
@jayfrosty3327
Жыл бұрын
you are the reason I will fail one less class this semester!
@josephbermudez9533
4 жыл бұрын
have you ever done part 5 of this series? Nice videos man!
@raulfilea5234
3 жыл бұрын
Yo mate, thanks a lot, it really helped me for a school project!
@Rockyzach88
Жыл бұрын
If anyone is having trouble with their Client Handler getting an IOexception, make sure you delete all the swing/jframe code from the first videos. He took it out of his code. IDK if he mentioned that somewhere and I missed it or what.
@Is-ux9jf
3 жыл бұрын
Thanks for this video. When I type "quit", it shows me a set of errors rather than leaving the chat. How can I avoid that?
@BILSON220
3 жыл бұрын
"Ya know, your memory, with help from the IDE" .... 😂😂😂
@sebastianspence1638
8 ай бұрын
Sorry did you ever expand this to a part 5? thanks!
@radjabelarbi6608
2 жыл бұрын
let's say that we want all the clients to receive a message from the server (without getting blocked by reading the keyboard) when the server gives a specific output. What shoud we do?
@LennoxHaynes21
4 жыл бұрын
This was very helpful
@biswamohandwari6460
3 жыл бұрын
Your a genius
@pedrosousa7254
2 жыл бұрын
Hi. Thanks for the great video. Is it possible to control (server side) when a client has disconnected? Say, a client just closed its connection, and the server becomes aware of that, and removes the disconnected client from the ArrayList, and carries on. Is this possible?
@bellefille8719
4 жыл бұрын
my code not execute multi client ..why?
@santiagowhite5467
3 жыл бұрын
same problem
@Mark-vt7pl
Жыл бұрын
When i try to run the second client i get "Process 'Client' Is Running, 'Client' is not allowed to run in parallel. Would you like to stop the running one?" :(
@johnsheikh3831
Жыл бұрын
you need to change the setting to allow two windows of the client window
@nidhishah9701
3 жыл бұрын
I had threadpool of 2 and it took connection from 6 clients. What am I doing wrong?
@justfuture6585
4 жыл бұрын
Good video. Thank you. Learned a lot :)
@ethanhunter6530
2 жыл бұрын
Thank you david
@just3at46
3 жыл бұрын
Thanks for those tutorials!!! One question: how did you run multiple clients? my intellij didn't let me do it.
@ikyyntts7807
3 жыл бұрын
click build in the top right then go to the client.class in file explorer, shift + right-click and open powershell, then type java client in as many powershells as you need
@nualaheery3704
5 жыл бұрын
Hey, these videos are great. I'm using android studio and have been able to use this to mostly achieve what I am trying to do with a user interface. The only problem is that once I made it so that the server sends messages to all clients, the server no longer receives the message from the client. I'm assuming is some sort of thread problem. Any advice?
@coyotemoon722
4 жыл бұрын
Dude, seriously post the code. I like the videos but it's very hard to jump around to find what you were doing.
@Rockyzach88
Жыл бұрын
I had an instructor once that made us do this basically. He said we would use his code but we had to read it from a fucking video. _facepalm_
@tomkers850
4 ай бұрын
I'm not sure how it's possible to watch this. The keyboard is louder than the speaker.
@sonphongnguyen4022
2 жыл бұрын
hope to see the part 5
@BBonable
3 жыл бұрын
thank youu dude, but there is one thing I did not I understand that how could you make the client class run parallel with each other, I could not run those clients at the same time. Thank you!
@terry1311
3 жыл бұрын
Edit the run configuration for the client, click: Modify options and click "Allow multiple Instances" :-)
@youssefyasser5601
3 ай бұрын
@@terry1311 THANK YOU! I've been stuck so long trying to do it. God bless you
@byorzech
3 жыл бұрын
You are awesome!
@szilagyimiklos4757
2 жыл бұрын
Why not post github link of the project....
@ddobievich
2 жыл бұрын
yes, sorry about that. This was made for a high school class I teach and the purpose was for them to make it themselves.
@cecilclwong8982
2 жыл бұрын
Hi Dave, Thanks for your video I found that when I disconnect the client from the server, there's a exception: Exception in thread "pool-1-thread-1" java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because "" is null at ClientHandler.run(ClientHandler.java:25) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) at java.base/java.lang.Thread.run(Thread.java:831) Is there a way to solve this problem? thanks
@juanpamss
3 жыл бұрын
Since this program is using a Client Handler class, would it be possible to shutdown the server when any client sends a "shutdown" command to the server? I know this might not be a common behavior but I am still curious.
@Ved3sten
4 жыл бұрын
I don't know much Java. How come we need to put a catch block in the run method to handle .readLine()? In the Sever.java file we didn't catch the exception.
@Abbe41
2 жыл бұрын
Amazing
@mariodacosta7120
4 жыл бұрын
Can you put here a link to download the java code? Thank you very much
@antekklosinski5789
4 жыл бұрын
Is there a chance to find this code on Github?
@backToFreedom
4 жыл бұрын
Excellent
@guydusol9370
2 жыл бұрын
hi, great tutorial, but if i put pool.execute(clientThread), it tells me that ClientHandler cannot be converted to runnable ? Can you help me please ?
@guydusol9370
2 жыл бұрын
found it, sorry
@cyberstair
4 жыл бұрын
I need source code of this
@alihosseinzadeh9
4 жыл бұрын
me too. He has changed sth in video gaps and did not record them. I ask him to put the last parts texts here. thanks
@MrOvergryph
3 жыл бұрын
not too long at all ;) keep going senpai
@jaydipmakwana9390
4 жыл бұрын
if i want to connect two client using server like pubg, how is possible in java?
@XpLoeRe
4 жыл бұрын
When client types quit, he cannot send messages but he keeps getting them because he is still in the list
@fakewars9395
3 жыл бұрын
Bro, i have question, how to send data from server to client base on ipaddress ? thankyou
@PankajKumar-ft7lc
3 жыл бұрын
You can't send data from server to client. You must establish a connection beforehand then it is possible but the server can't initiate a connection. Now if you know the IP address then you can match it with the clientSocket.getInetAddress() for each client if they are equal send your data to that socket.
@andreridho271
4 жыл бұрын
sexy typing sounds
@alucates8629
2 жыл бұрын
how old are u?
@abdullahhani672
4 жыл бұрын
THANK YOU DUDEE
@mehmetsahin6521
4 жыл бұрын
cool :)
@maazhassan3249
Жыл бұрын
can i get source code ?
@wesyjam
3 жыл бұрын
Too much brightness... i didnt even recognise intellij for a few minutes
@mehmetsahin6521
4 жыл бұрын
how can I disconnect a client in multi-client?
@lythd
4 жыл бұрын
you will have to create a new class (I called it RemoveFinished), let it implement runnable and put this one line of code inside the run method *for(ClientHandler c : Server.clients) if (c.finished) ((ThreadPoolExecutor) Server.pool).remove(c);* make sure pool and clients are public. in your Server class put before your previous first line of main *pool.execute(new RemoveFinished());* now just make sure in your ClientHandler class, you have a public boolean called finished and turn that to true when you want to disconnect. And make sure you break away from any loops. And at the first line of that run put *if(finished) return;* I can explain if you want, hope this helped. EDIT: This was just the solution I used, it may not be the best one.
@bek7743
4 жыл бұрын
Could u please make this part of code a bit clearer, thanks
@larrychiem8345
4 жыл бұрын
@@lythd "in your Server class put before your previous first line of main pool.execute(new RemoveFinished());" what do you mean?
@lythd
4 жыл бұрын
Larry Chiem whatever you had first previously go before that and put in the code in bold, this was a few months ago so i cant remember much off the top my head but if you need further help im sure i could find my working code
@thisisneeraj7133
3 жыл бұрын
@@lythd can you pls give the GitHub link of this code if you havs any even of your own
@laushofia8392
3 жыл бұрын
could u give a source code?
@madrassaghosiarizvia203gbo4
3 жыл бұрын
please share source code
@rionacko748
3 жыл бұрын
Is this p2p?
@dgh25
Жыл бұрын
source code or it didnt happen!
@amirayasmine8490
4 жыл бұрын
it doesn't work
@vt4316
2 жыл бұрын
I know
@Rockyzach88
Жыл бұрын
I'm sure you're a master programmer now but it was probably because you left code in there from earlier videos that he took out and apparently didn't tell anyone.
@user-eo2th2lf6f
4 жыл бұрын
What is a socket?
@danielhughes3758
4 жыл бұрын
Go back to part 1 in this series. He explains it very well there
Пікірлер: 88