Socket Programming in Java One Way

preview_player
Показать описание
Define IP address and port number for client and server connection.
Server socket is used for multiple client connection with server.
Every client requires one socket.
We have to create two classes one for client and one for server.

Check out our courses:

Coupon: TELUSKO10 (10% Discount)

Coupon: TELUSKO10 (10% Discount)

Coupon: TELUSKO20 (20% Discount)

Subscribe to the channel and learn Programming in easy way.

Рекомендации по теме
Комментарии
Автор

Как замечательно иметь такого прекрасного учителя на YouTube! Я хотел бы выразить свою искреннюю благодарность за все знания и информацию, которые вы делитесь со мной и другими зрителями. Ваше усердие и преданность в деле обучения заслуживают самой высокой оценки.

Спасибо вам за ваше время и труд, которые вы вкладываете в создание контента на YouTube. Я ценю все уроки, которые вы даете, и надеюсь, что ваше вдохновение и знания продолжат помогать другим ученикам в их учебе.

Еще раз огромное спасибо за ваше прекрасное обучение на YouTube! 😄

omkattarle
Автор

Some helpful tips:
1. Temporarily disable your firewall to prevent firewall from stopping network traffic on your chosen port (9999)

2. You can use
ObjectOutputStream os = new
PrintWriter out = new PrintWriter(os);
out.println(msg);
os. close();
in your client.Telusko corrects his mistake in the next video called "Socket programming in Java Two Way".

But this also works as seen in the video, so actually you don't need the PrintWriter object:
os.write(msg);
os.close();

3. IMPORTANT: Start your SocServer first and SocClient next!

4. You have two consoles, because you start two programs. The server is printing the incoming message too its console. So when you see no message, you're probably looking in the console of the client.

DeoSTerriere
Автор

Best instructor ever and ever. I'm a big fan of you sir. thanks a lot.

faiseen_talks
Автор

You are the best java lecturer on entire website.

biruh-edu
Автор

you are doing very great man. I am learning too much from your channel.

alixaprodev
Автор

man u r excellent i wasted 2days(12hours) on "what is socket " and u explained just in 2 min and u also told how use socket i subscribed and thank u very much, i wanted to create a client android app can use this coding?

bashamsk
Автор

If you get a Error looking like this: java.net.ConnectException: Connection Refused -> It could have following solutions: 1. start server before client, 2. turn off your firewall, or, which worked for me: 3. in your Clien class, make the String end the line with appending \n like this: String str = "Navid Reddy\n" (-> br.readLine() expects a full line (at least on my computer?), I don't know why the code shown in the tutorial seems to work for so many people without ending the line)

g-l
Автор

Hi navin, i am new to java. Can you tell me what is the use of out variable in socClient program? I mean purpose, as it's not being used... Thank you so much for making such video. You have changed the way of learning and studying. Thank you and and I mean it seriously

parwana
Автор

exquisite illustration as usual.Your keynotes have always rendered me some good coding understanding

saadmanahmed
Автор

Great tutorial! You helped me understand about TCP connections! :)

marcusleeeugene
Автор

I think you missed "os.close(); " in the client program, right?

royrao
Автор

Sir, Thanks for such a good tutorial.

trueIndianJaiHind
Автор

Hey buddy,
Grate and simple tutorial . BTW, I did not get it why did you create Print Writer, because you never used it .
Thx in advance.

Mreven
Автор

Best tutorial on the subject! Thanks mister!

xGrofx
Автор

My first networking program! Thanks :) tutor!

koushikshomchoudhury
Автор

we can also use out.println() in place of os.write().

PratikShende
Автор

Nicely explained thank you, can you talk about how a server can generate a unique ID for client that connects and how one client can communicate with another, through the server.

vanrensburg
Автор

+Telusko Learnings Why was the PrintWriter created? It was never used. Also I tried without PrintWriter. It worked fine for me.
OutputStreamWriter osw = new OutputStreamWriter
osw.write(message);
osw.close();
Is it necessary to create PrintWriter object?
Thanks

ziddy
Автор

Thanks for the generous share. Btw which kind of Projects did you initiate?

xiaoyingsun
Автор

Hi Naveen, you are a life saver. Any plans on making creating JavaScript playlist?

mridulmishra
welcome to shbcf.ru