Как замечательно иметь такого прекрасного учителя на KZbin! Я хотел бы выразить свою искреннюю благодарность за все знания и информацию, которые вы делитесь со мной и другими зрителями. Ваше усердие и преданность в деле обучения заслуживают самой высокой оценки. Спасибо вам за ваше время и труд, которые вы вкладываете в создание контента на KZbin. Я ценю все уроки, которые вы даете, и надеюсь, что ваше вдохновение и знания продолжат помогать другим ученикам в их учебе. Еще раз огромное спасибо за ваше прекрасное обучение на KZbin! 😄
@DeoSTerriere2 жыл бұрын
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 ObjectOutputStream(s.getOutputStream()); 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.
@biruh-edu26 күн бұрын
You are the best java lecturer on entire website.
@faiseen_talks7 жыл бұрын
Best instructor ever and ever. I'm a big fan of you sir. thanks a lot.
@vinayakgarments91822 жыл бұрын
Watching this video in 2023..
@alixaprodev4 жыл бұрын
you are doing very great man. I am learning too much from your channel.
@royrao9518 жыл бұрын
I think you missed "os.close(); " in the client program, right?
@arveersingh97288 жыл бұрын
as long as i know it is not necessary to close every reference.
@abhijeetrastogi70878 жыл бұрын
But it was necessary in my case. as without it the client thread was being closed even before it flushed the data.
@programmingforbeginners87068 жыл бұрын
tnx man . .i just found my error . after looking . to run my prog so many times
@kundan6257 жыл бұрын
Thanks man
@moonbrush57 жыл бұрын
Saved my time. Thanks!
@g-l84924 жыл бұрын
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 like this: String str = "Navid Reddy " (-> 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)
@musfikuroli3 жыл бұрын
Thanks a lot. Just adding " " worked for me.
@JohnDoe-ml2zy2 жыл бұрын
@@musfikuroli Thanks a lot bro you saved me from going on an endless hunt on StackOverflow Edit: You too @G-L
@ankanpal91639 ай бұрын
didnt worked bro
@bashamsk12888 жыл бұрын
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?
@Cowboy1Brian7 жыл бұрын
Did you ever get an answer to this question? Im trying to find out how to send coordinates from one device to another, and display those coordinates in a map on that other device.
@xGrofx7 жыл бұрын
Best tutorial on the subject! Thanks mister!
@parwana10007 жыл бұрын
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
@marcusleeeugene7 жыл бұрын
Great tutorial! You helped me understand about TCP connections! :)
@Mr47even8 жыл бұрын
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.
@saadmanahmed8604 жыл бұрын
exquisite illustration as usual.Your keynotes have always rendered me some good coding understanding
@koushikshomchoudhury91087 жыл бұрын
My first networking program! Thanks :) tutor!
@meghamalhotra78148 жыл бұрын
Sir , Thanks for such a good tutorial.
@santhoshmedide52798 жыл бұрын
You know well ,to teach beginners!!
@reshamdevirajasthan21245 жыл бұрын
Very good explanation..Thanks
@KarshSoni8 жыл бұрын
Awesome Telusko Learnings
@ravindrareddy28228 жыл бұрын
chala baaga chepparu thanq
@cassi47902 жыл бұрын
that was very helpful!tysm
@ziddy267 жыл бұрын
+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 (clientSocket.getOutputStream()); osw.write(message); osw.close(); Is it necessary to create PrintWriter object? Thanks
@ashwanikumar42886 жыл бұрын
I also have the same doubt
@curiousgeorge63074 жыл бұрын
I was also wondering the same thing
@jintujose_288 жыл бұрын
Could you please create a video for how to create a directory on the server side using socket programming in java
@PratikShende916 жыл бұрын
we can also use out.println() in place of os.write().
@chhaylin32105 жыл бұрын
Great video
@vanrensburg37604 жыл бұрын
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.
@xiaoyingsun45814 жыл бұрын
Thanks for the generous share. Btw which kind of Projects did you initiate?
@cringelord5113 жыл бұрын
java project
@ashishposte81927 жыл бұрын
In the Client program ,you have created Printwriter but you did not use it at all.
@ishajha12436 жыл бұрын
Thank You Sir
@sauravmukherjeecom9 жыл бұрын
Nice. Do u have anything about Java XML parsing?
@eren96lmn8 жыл бұрын
os.write(str) line should be replaced with out.println(str) to work properly on some systems.
@ayushpratik42086 жыл бұрын
Same problem was with me........thanx for ur help
@ALSAHER795 жыл бұрын
Eren L Thanks a lot. I wasted more than 2 hours to fix the issue.
@anmjubaer5 жыл бұрын
Thanks a lot man.
@pruthvirajjadhav19964 жыл бұрын
great help !! but what it makes difference ?
@ajinkyasanas22563 жыл бұрын
Thank u so much
@VrlHtzz4 жыл бұрын
Why my program get terminated when I run client class ...... Server runs fine Wht should I do
@singh65699 жыл бұрын
Thanks for tut. Just few questions. Do you have tut about JSP? To learn JSP ,do someone need to learn JAVA first. What is different b/w java nd JSP? Thanks
@ankushroy9194 жыл бұрын
do we need same package for client and server?
@hussain17558 жыл бұрын
why did u create printwriter "out" ?? you never used it in the client socket
@SM-vo5gj8 жыл бұрын
this is what i was wondering, and possibly is source of problems a couple comments up- with os.write ... should it have been out.write?
@hemanth69518 жыл бұрын
hi,i am your fan from long year,but you never noticed me
@shubhamsangale8906 жыл бұрын
Sir, even if pass value "true" with the str in printwriter it works!!! can you please let me know the reason??
@onlyforstudy71833 жыл бұрын
Plzz more explain about program
@varundurvasula75365 жыл бұрын
Can we achieve this by using scanner? (instead of bufferedreader)
@andevinay14945 жыл бұрын
where you have used Print Writer object out in the client class
@anwarulkaium11016 жыл бұрын
Hi Navin, thanks for this wonderful video. How would I transfer a List of elements from a server to client by using DataInput/OutputStream. I tried with out.write(list), it does not work. Your reply will be highly appreciated.
@ramzi-sah5 жыл бұрын
7:18 nine nine nine nine mine furheur
@AYAN4544 жыл бұрын
where do we need "out" variable then?
@hristoplamenov19426 жыл бұрын
Hello guys, just one question - why it deletes the information in the client side after i run it ? It shows the Navin Reddy and then black screen :/
@mridulmishra81667 жыл бұрын
Hi Naveen, you are a life saver. Any plans on making creating JavaScript playlist?
@satadhi6 жыл бұрын
why will you use opera when you have a mac ?
@Onomandah6 жыл бұрын
What was the purpose of creating a PrintWriter object??
@JohnDoe-ml2zy2 жыл бұрын
I have a problem: When I run the client side, it says "Connection Reset" error on the server console. How can I resolve this?
@DirtyDan6125 жыл бұрын
When I run the server I get the two statements to print but when i run the client nothing happens, any ideas why? My code is exactly the same.
@sajithkumaresan36457 жыл бұрын
Hi can you please make a video regarding sockets in java script.
@ramsha9107 жыл бұрын
sir how to sent commend also make a video
@vidyasagar-qe9ds5 жыл бұрын
how to receive the data from the GPS device /Hardware ,GPS will be sending the data to predefined IP address , please guide
@satadhi6 жыл бұрын
what does line 17 do ? in cient side
@orz55166 жыл бұрын
if i have a real client - written in angularJs, how this is different? thanks
@anchitajain60668 жыл бұрын
I can't main class with different name as project name and this then gives error on making 2 main class files in same project. I am working in net beans. what should I do ? please help ..
@priyankamonalisa20288 жыл бұрын
Hi, Could please tell me how to do this client-server in 2 different system in same network? I tried to give the IP of server in client, but it didnt work?
@pullareddyanumula51539 жыл бұрын
how to send file client to server
@ujjalsamanta58416 жыл бұрын
sir i need full courses network programming on Python. i am ready to buy it.
@kaustubh214 жыл бұрын
I want to pass 2 values from client i've written os.write(val1) and os.write(val2) but how can i accept them on the server
@priyamnagar14978 жыл бұрын
On my system os.write() is giving a SocketException but when i use out.println() , then it is working . Why did this happen???... Please Reply.
@realprince1107 Жыл бұрын
Can anybody tell where is the next video, please?
@yuyuliang23116 жыл бұрын
I have written the same code. But the server never connect with client, although their port are same.I have checked the code many times. But I can't find the problem yet.
@SourabhMaybhate6 жыл бұрын
what error your getting?
@manish.periwal7 жыл бұрын
how to communicate between two remote machines?
@ydtj203 жыл бұрын
Exception in thread "main" java.net.SocketException: Connection reset sir how to handle this?
@williamletwaba27538 жыл бұрын
How can 1 send an XML message to the server?
@akashshrestha015 жыл бұрын
Cool
@lololollolololo36507 жыл бұрын
Why have you created PrintWriter object ,, out ,, and you dont use it?
@arunberlin7 жыл бұрын
i have the same doubt...do u know y ?
@myfunnyvideos82859 жыл бұрын
plz upload chat application..
@sagarbathla51605 жыл бұрын
can anyone please tell how to connect two clients using socket instead of client and server
@suryabhagavan83907 жыл бұрын
HI, This is bhagvan. Iam getting NetworkOnMainThreadException when rnning this code. I was tried in google but there are no source. can you please tell me why this coming. give the link for referance if possible. Thank q
@susannaantinyan45956 жыл бұрын
out.close(); after os.flush();
@wilburtmoreno4696 жыл бұрын
i did excatly whats in your program. and an erroe accured is says. "java.net.SocketException: connection reset" how can i solve this error?
@duff22336 жыл бұрын
in client program there is a os.close(); missing after flush()... I had the same problem
@gouravthapa58156 жыл бұрын
In client class. insert a newline character in end of your data. e.g println("Nanin Reddy "); because readLine() function need a newline character to stop reading.
@akhilmishra6246 жыл бұрын
Exception in thread "main" java.net.UnknownHostException: local host at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at java.net.Socket.connect(Socket.java:538) at java.net.Socket.(Socket.java:434) at java.net.Socket.(Socket.java:211) at Client.main(client.java:12) ..sir i am getting this error ...what to do?
@amartyachakraborty57397 жыл бұрын
" java.net.SocketException: Connection reset " sir i am getting this error .. what to do?
@arunberlin7 жыл бұрын
You need to close the outputstream object and socket object Add these 2 lines after os.flush(); out.close(); s.close();
@susannaantinyan45956 жыл бұрын
only out.close() is enough.
@SourabhMaybhate6 жыл бұрын
yeh..it works
@corporateexplorer65447 жыл бұрын
java.net.SocketException: Connection reset sir please help ye exception aaa rhi h
@mandarkulkarni53412 жыл бұрын
I am sending integer then the server is getting -1
@mandarkulkarni53412 жыл бұрын
Please help
@WaqarAli-me5xg3 жыл бұрын
I have copied same code,but not working
@Sagarloona8 жыл бұрын
Exception connection reset on same code
@biswamohandwari64604 жыл бұрын
Socket programming don't words over WiFi
@dragon_warrior_4 жыл бұрын
IDK why people uses JAVA for socket Programming as there is python which is very easy and simple to use then ,I'm just here because tommorow is my exam :/
@vennivennela81887 жыл бұрын
sir,how to send message two separate computers using Sockets
@ANKITSingh-eg4ww3 жыл бұрын
Code not running, please check before uploading, terrible program...