Тёмный
No video :(

Simple TCP Chat Room in Java 

NeuralNine
Подписаться 362 тыс.
Просмотров 93 тыс.
50% 1

In this video we build a simple TCP chat room in Java.
◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
📚 Programming Books & Merch 📚
🐍 The Python Bible Book: www.neuralnine...
💻 The Algorithm Bible Book: www.neuralnine...
👕 Programming Merch: www.neuralnine...
🌐 Social Media & Contact 🌐
📱 Website: www.neuralnine...
📷 Instagram: / neuralnine
🐦 Twitter: / neuralnine
🤵 LinkedIn: / neuralnine
📁 GitHub: github.com/Neu...
🎙 Discord: / discord
🎵 Outro Music From: www.bensound.com/

Опубликовано:

 

20 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 85   
@dgh25
@dgh25 Год назад
To run multiple clients in the IDE: 1. Run the client class 2. Click the down-arrow in the top right corner of Intellij where is says "Client" 3. Click "Edit configurations..." 4. In the "Run/Debug Configurations" dialog, click the "Modify options" arrow and select "Allow multiple instances"
@shieth314
@shieth314 Год назад
Thank you very much for the video! It was greatly helpful! Below are IntelliJ macros that could expedite the process for writing the main method and the standard output println method: - For main method: type 'psvm' then press tab to have the main method written fully - For System.out.println: type 'sout' then press tab to have the System.out.println method written fully
@Radical9535
@Radical9535 Год назад
you should make more of these java videos! python is cool but java seems cool too!
@icodigo1
@icodigo1 9 месяцев назад
Love it when errors come up!, this is the real life while programming. So, also we learned how to troubleshoot our own code.
@eepikki
@eepikki 2 года назад
I think this is the key to starting to learn java for me
@kaneki_ken_07
@kaneki_ken_07 2 года назад
It's an interesting language, you should learn it.
@aditya_asundi
@aditya_asundi 2 года назад
@@kaneki_ken_07 yes. Ppl say java is too wordy and takes a year to print hello world, but that's what makes it better. More syntax means the code is actually readable and customisable.
@eepikki
@eepikki 2 года назад
@@kaneki_ken_07 I have done some basics but I have always just came back to Python. I love that too and it will always be number 1, but Java I feel could be a good skill
@meru_lpz
@meru_lpz 2 года назад
It's a good time to start learning java, the language has actually been getting some updates to become less wordy (var, records)
@kaneki_ken_07
@kaneki_ken_07 2 года назад
@@eepikki I aslo learned Python as my first language, and I too consider it as the king, C is kinda hard language, but JAVA was made with the reference to C, to get the functionality of C in easier syntax, so, you should learn JAVA as well besides Python, because Python somewhere lacks these features. And C is the most powerful language I have ever seen
@mumk
@mumk 2 года назад
This is a lot of fun, thanks!
@RanchoX
@RanchoX 7 месяцев назад
The client connection probably doesn't close, because you're using .equals("/quit"), maybe the string has white spaces or next line characters which aren't captured by .equals(), .contains() is more useful on that use case
@kingofcurses0275
@kingofcurses0275 4 месяца назад
Thank you so much! you made it really easy to understand and implement.
@alicoder8
@alicoder8 11 месяцев назад
Positive. Useful and helpful. Like every video!🤟
@Dean-zi5bj
@Dean-zi5bj Год назад
Thank you, I really appreciate the good material, blessings to you and your family of happiness, abundance and good health.
@DayshiaSweet-t7n
@DayshiaSweet-t7n Месяц назад
great tutorial. learned alot!
@zakyvids6566
@zakyvids6566 2 года назад
Consider making a short maybe 1 hour crash course on JavaScript
@Man-Vs-Car
@Man-Vs-Car 2 года назад
Hope we can get more java videos. Nice!!
@psharma2067
@psharma2067 2 года назад
Looks like neuralnine is reading our mind He is delivering content at right time
@someonesomewhere7057
@someonesomewhere7057 2 года назад
Might actually try to learn Java someday
@Pages_Perfected
@Pages_Perfected 8 месяцев назад
That was amazing, ty
@jesusdacoast872
@jesusdacoast872 2 года назад
Good job dude 😎
@Aaron-rh7sz
@Aaron-rh7sz 2 года назад
That's pretty cool
@pconairofficial4333
@pconairofficial4333 Год назад
I respect you a bang
@beginnerwithcode
@beginnerwithcode 3 месяца назад
Thanks , ı love you bro ❤ 😊
@cheeesecake6989
@cheeesecake6989 Год назад
Thank you !! 🙏
@garethharriott9582
@garethharriott9582 Год назад
Im getting a real annoying error Apparently this.client is null I don't know what that means and google is no help
@BensStuff
@BensStuff Год назад
change the port to 9999
@Sunnythesage
@Sunnythesage Год назад
Thank you!
@ChristianErwin01
@ChristianErwin01 Год назад
I'm able to run the server and after connecting with a client and entering the nickname, nothing happens on either end. Any reason why this may be?
@Doggy_Styles_Coding
@Doggy_Styles_Coding Год назад
out = new PrintWriter(client.getOutputStream(), true); The true is important (autoflush). it needs to be set true in both classes. otherwise the server can't recieve the message. I had the same issue after i forgot the vriable in the PrintWriter (autoflush = true). Hope it will fix it.
@egormolkov7590
@egormolkov7590 Год назад
thx man!
@artofgamingwarfare3658
@artofgamingwarfare3658 Год назад
It's weird, I can run the server once, run a client on it. once i shut down the client, i'm not able to hit run on the server again. I think I may be missing something
@artofgamingwarfare3658
@artofgamingwarfare3658 Год назад
I don't think the server is shutting down. Edit: I got it figured out.
@nishanttanksale8451
@nishanttanksale8451 Год назад
@@artofgamingwarfare3658 what did you do?
@emanuel1657
@emanuel1657 6 месяцев назад
he probably had a dynamic ip and then changed it to static
@maksimbondarchuk8953
@maksimbondarchuk8953 7 месяцев назад
I dont get more than half what are you saying, but thats pretty interesting
@Zandulu
@Zandulu Год назад
Thank you
@AlmightyFork
@AlmightyFork Год назад
does someone know a tutorial for making a gui around this code?
@nguyen1604
@nguyen1604 Год назад
Cannot invoke "java.io.BufferedReader.close()" because "this.in" is null I had bug in class Client Can you help me fix it?
@emxoco
@emxoco Год назад
did u fix it?
@emxoco
@emxoco Год назад
if yes, how?
@hokwanhung
@hokwanhung 11 месяцев назад
​@@emxoco I have fixed the problem; there are two parts: First, the port for ServerSocket (i.e. 9999) is already used; use something for TCP like 15001. Second, in the method of shutdown, include something like "if (in != null && !in.isClosed())"/"if (client != null && !client.isClosed())" so it actually will detect whether there are any sockets first.
@amanraval7027
@amanraval7027 Год назад
I think that this @override, basically i feel about it that this keyword @override is useless at line 3 because we use override for method that is have some work or some funtion to perform already but in your case the method "run" of the class Runnable just declare it is not performing any function so it looks meaninglessto me, but let meIknow if i mwrong, it would be appreciated😊🥰.
@debdeepsanyal9030
@debdeepsanyal9030 4 месяца назад
nope. you have to override and implement the run method, thats how multithreading in Java works. to start a Thread you basically call t.start() and this start method is calling the run() method in turn, hence it's important to override and implement the run() method. if you don't, you'll be getting an error.
@szilaszilaful
@szilaszilaful Год назад
can you help? when running on different devices, it wont connect to server
@sbipoaspirant2024
@sbipoaspirant2024 6 месяцев назад
Hi! I have done the coding, the connections are establishing fine but the output stream and input streams are not being sent or received from server to client, can someone please help?
@canadianbeast8671
@canadianbeast8671 2 года назад
THANKS
@user-sj8my7gp6n
@user-sj8my7gp6n 2 года назад
please make more video for java.🎉
@ohkkai
@ohkkai Год назад
How do I get to this lvl of understanding? Gosh, I feel like I m stuck
@yh4438
@yh4438 9 месяцев назад
Yo this so cool where can i find tutorial like this
@dangeonmaster6839
@dangeonmaster6839 Год назад
How to clean ArrayList after disconnect?
@slicer8112
@slicer8112 11 дней назад
Anyone know what theme he is using?
@user-fh1mx6pz3r
@user-fh1mx6pz3r 2 месяца назад
does it work from 2 defferent laptops??
@salahdjouama1221
@salahdjouama1221 Год назад
amazing it worked on the localhost but when i try it in two deferent divices (i changed the ip addresses) it doesnt idk why
@oumaymajellali110
@oumaymajellali110 Год назад
I want the code of server
@prakhyathshetty6509
@prakhyathshetty6509 5 месяцев назад
does it implement SSL
@jacksanim
@jacksanim Месяц назад
doesnt work, doesnt let me run.
@alanrichter8594
@alanrichter8594 2 года назад
How You Made that with the command pydir in console You go to your python directory or any other
@jlee3361
@jlee3361 2 года назад
Google bash aliasing
@easchinta184
@easchinta184 2 года назад
Great video! Does anyone know if I could share this file to a friend of mine and then we could chat remotely through terminals? Or if anyone knows any tutorials on how to do that? Let's say my friend cannot program so it would be great if he only needs to get a file and make open and connect through the terminal or something.
@amir_hossainoroujlou3001
@amir_hossainoroujlou3001 Год назад
you need to open the file or datatype in base64 or encode it. and then share it and turn it back
@CarlosFernandez-js8yn
@CarlosFernandez-js8yn Год назад
@@amir_hossainoroujlou3001 can you elaborate a little more on this. What do you mean by turning it in base64?
@youruncle4
@youruncle4 2 года назад
s code plz
@anthonygarcia2459
@anthonygarcia2459 Год назад
This doesn't work if a user is typing a message while a new one is received from a different client. Please elaborate on how to fix this issue
@rosamaltonimussolini9715
@rosamaltonimussolini9715 2 года назад
What program is it?
@NeuralNine
@NeuralNine 2 года назад
A TCP chat room
@rosamaltonimussolini9715
@rosamaltonimussolini9715 2 года назад
@@NeuralNinelike the deplovementing program (not java the program you use to deplov the chat room)
@omerselimatila3530
@omerselimatila3530 2 года назад
@@rosamaltonimussolini9715 I think it isn't compitable with you, so never mind.
@rosamaltonimussolini9715
@rosamaltonimussolini9715 2 года назад
@@omerselimatila3530 But I I can play a windows 10 VM :)
@xayahlover6688
@xayahlover6688 Год назад
Can you share the source code?
@oumaymajellali110
@oumaymajellali110 Год назад
Yes plzz
@Etka06
@Etka06 5 месяцев назад
He did you just need to watch the video.
@GermanTimecrafter
@GermanTimecrafter 2 года назад
Weird to see you coding in Java 😂
@ProgrammerRajaa
@ProgrammerRajaa 2 года назад
how can I get the code ?
@MananGandhi
@MananGandhi 2 года назад
you dont. the whole purpose of his videos are that people code on their own and don't just copy code
@07GT783
@07GT783 Год назад
@@MananGandhi you are absolutely right this is a tutorial project , not just a copy paste code project.
@user-xx9rg9lc9b
@user-xx9rg9lc9b 6 месяцев назад
@@07GT783 have you ever considered that I don't want to break my ass watching all 40 minutes of his goddamn video trying to find where I missed a line of code that was shown for all of 5 themtoseconds so I can get a sample application to run? What difference does it make if you key in the code yourself or if you copy it from Github?
@mayursai7220
@mayursai7220 2 года назад
Say this in c++ also
@yoyopiyoyopi
@yoyopiyoyopi 2 года назад
Say it in english first
@brooth2566
@brooth2566 Год назад
cool but who really uses java now man
@gintoki8503
@gintoki8503 9 месяцев назад
💀 , I hope you realize that JAVA is used for a lot of things for example in space, the transmission of data from a satellite...I hope you will earn a brain. even for a lot of jobs employers ask for the applicants to know java.
@debdeepsanyal9030
@debdeepsanyal9030 4 месяца назад
Java is thriving in the backend s of literally all the companies you know of?
Далее
Java Socket Programming - Multiple Clients Chat
40:18
Просмотров 178 тыс.
Simple TCP Chat Room in Python
25:39
Просмотров 215 тыс.
Construction site video BEST.99
01:00
Просмотров 288 тыс.
Multithreading in Java Explained in 10 Minutes
10:01
Просмотров 909 тыс.
Java Socket Programming Client Server Messenger
16:28
Просмотров 101 тыс.
My Brain after 569 Leetcode Problems
7:50
Просмотров 2,5 млн
How to Do 90% of What Plugins Do (With Just Vim)
1:14:03
Просмотров 889 тыс.