Seriously appreciate this. Idk if you're just on my wavelength but this makes the most sense out of the socket IO and rooms tutorials I've seen so far. You quickly and perfectly explain what you're doing and why you're doing it without going overboard, and even though I'm working on an app that's not the same as the chat you make in this tutorial, I'm actually able to follow along and pick out or edit as needed without losing functionality.
@atticus25812 жыл бұрын
Damn, ussualy i speed these things up and had to check I hadnt increased playback speed, this guy talks fast! I like it!
@roodyridar27064 ай бұрын
me too 😂
@hermitanotherant29303 жыл бұрын
Just adding a callback to the original socket message is genius. Far more elegant than having to respond with a whole new message. Thanks!
@tahsinalmahi876910 ай бұрын
Great tutorial. Thanks a lot!
@p_o_z_e8 ай бұрын
This is still such a good video, super useful.
@number1neek3 жыл бұрын
Thanks for the video. Really well explained! One bit of constructive criticism though - I like the fast pace but at times it sounds like you're rushing and some words are hard to understand. I had to check I didn't have you set to 1.5x speed lol
@chriscalver8595Ай бұрын
That was awesome. Love that you speak fast.
@serjio87814 жыл бұрын
You've totally nailed this socket io stuff! Looking forward to the client side part :)
@CodingWithChaim4 жыл бұрын
Thank you! Well I certainly hope the client side part won’t disappoint
@VamsiKrishna-yt5hi3 жыл бұрын
I think it is not safe for the server to call a function passed by a client. That function could be anything. Moreover, you are revealing to the client that you are using a Javascript backend.
@brunobuss70053 жыл бұрын
this guy speaks so fast, i love it
@aleksandrmatyka31182 жыл бұрын
It's the best explanation that I've seen
@Whitetail3 жыл бұрын
Thank you very much. This is an amazing tutorial, very well explained. You helped me save a lot of time.
@christianangelomsulit37593 жыл бұрын
Set speed to 0.75 and everything for me is now clear
@thelitterateman3 жыл бұрын
slow down bruhh. M here to learn, but you're on a train.
@eloy_7773 жыл бұрын
You can just watch it slowed to x0.75, the video won't be that longer
@sashaikevich Жыл бұрын
1337. What a throwback ! Great pace for your vid. What do you do when you’re not making KZbin vids, got a blog or something I can read?
@ozzyfromspace3 жыл бұрын
Hey Chaim! This was a magnificent video, thank you so much for putting this beauty together! 🏆🎊🙌🏽 I'd like to voice an educated guess: the client-side defined callback may be a security risk. I'm thinking that a highly motivated attacker could reverse engineer your build js file and alter the callback to do something malicious, and it will run on your server regardless. That's my immediate thought, but I'll have to watch the next video to see how you do the cb. I read it in the docs a few weeks ago but I didn't understand it then. Do you have an opinion on this? Again, phenomenal explanation of the "rooms" concept! 💯😎
@jonahg65644 жыл бұрын
Amazing! Keep the content flowing!
@yasteelgungapursat81592 жыл бұрын
Explanations are on point👌🏻 but damn I thought the video was sped up🤣
@mentalmodels53 жыл бұрын
10:16 wouldn't that be insecure? Since people can modify the client javascript and execute another function?
@williamduncan74013 жыл бұрын
if your function is e.g. `console.log` this will not trigger `console.log` on the server, just on the client. it's literally like emitting a response back containing the function name and arguments and the client calling the function, but it's a built-in thing to save you that client-side code
@saadbaig30602 жыл бұрын
Very Well Explained! You got a new subscriber, Thanks.
@GHOST-fe3cu2 жыл бұрын
you make my adhd very happy
@CodingWithChaim2 жыл бұрын
Haha happy to help
@gurkanucar2 жыл бұрын
Thanks a lot! By the way, cb(callback) is equal to ack. It may cause confusion because I am applying this in the java spring boot application and I couldn't find anything about the callback. So just i wanted to mention it. Thank you again :)))
@prathameshpatil58602 жыл бұрын
This is awesome but I have a question if I wanted to remove a user from channel(room) how can I do it??
@ikibkilam83833 жыл бұрын
Very cool! Thank you for doing these videos. Btw, I think the link to the code repository for this video is not correct.
@ikibkilam83834 жыл бұрын
Awesome video. Incredibly lucid.
@deeperealms3 жыл бұрын
Really awesome tutorial! I am kind of concerned about the security of letting the client send a callback function to run on the server though. I've just been getting deeper into security, so maybe I'm paranoid, but it seems very vulnerable to some sort of code injection?
@ЖукОбычниик3 жыл бұрын
I don't agree with you passing a callback function from the clinet side this is literally the most dangerous thing you can do because hackers
@ЖукОбычниик3 жыл бұрын
@Amir Moeen Rahmani well you see whet he does is he gets a function from the user and executes it on the backend but the user can put whatever malicious code he want in that function with that the hacker can: crash your backend, make a never ending loop preventing the backend from functioning properly, steal all the data he wants, and the list goes on. This dude is legit letting anyone send a function to the backend that will get executed even I with 0 hacking skills could crash his backend
@CodingWithChaim3 жыл бұрын
This is the docs from socket.io talking about this approach. socket.io/docs/v3/emitting-events/ Scroll down to Acknowledgements I should also mention that there is no risk here because this is not code that executes user code. A good example where one more worry about executing user code is with the common xss attack. For example, you have a blog, and then you have comments, now a user can make a comment have a script tag and then add their own javascript to this script which will execute on your website. This works because when you render a script tag, the code within executes. In this case however, you are not taking user entered data and passing it along to an environment that can execute this code. Hope this helps clear things up.
@ЖукОбычниик3 жыл бұрын
@@CodingWithChaim But can I not write a regular node script that will connect to the server and emit an event with the malicious function?
@mindglimpse559Ай бұрын
@@ЖукОбычниик When the server executes the callback provided by the client, it is essentially sending a message back to the client that triggers the client's function. The server does not run the client's code directly.
@princeanujk3 жыл бұрын
Amazing Content...💕 Just Watch @ 0.75x Playback Speed...
@zoksss53232 жыл бұрын
I have a question. So basically, when user joins, you push its username and id to usernames array, which contains all users. But what happen if user leaves and his info still stays in array? I'm doing something simmilar with pushing room code which is a object with few details and users insde that room eg. "123" = {leaderId: "", isLocked: false, sockets: []} , but when all users leave, i want to destroy that room object, but idk how to do it properly, or is it even possible, or shoud I change whole system for better one, since Im still new to socketio?
@DoctorMandible Жыл бұрын
What's the advantage of using express when you're also using socket?
@ivaylosilovski55293 жыл бұрын
Great content! Keep it on going :)
@CodingWithChaim3 жыл бұрын
Thanks! Will certainly keep it going
@_MoshikoAz_ Жыл бұрын
thank you Chaim, can you please provide git source ?
@rezaulmasum2054 жыл бұрын
hey If I would like to access socket in another page like I have multiple controller, how can we pass it to different pages?
@nom213043 жыл бұрын
imagine him rapping :o
@nickvelos95713 жыл бұрын
Bruf he has surpassed Eminems level of speed speaking
@realzoogies2 жыл бұрын
awesome video 👍
@theunknownclone80843 жыл бұрын
Great video!!!
@maheshmahadar47803 жыл бұрын
in my website i cant use @t on multiple pages. is it valid or not i am doing ?
@ouss4 жыл бұрын
Can you do one with the twilio video rooms API, its easier
@CodingWithChaim4 жыл бұрын
Can certainly take a peek into it
@ouss4 жыл бұрын
@@CodingWithChaim It would be great and quick in just 10min
@hanibal434 жыл бұрын
always love your vids! would love to see you make more vids on javascript and react
@CodingWithChaim4 жыл бұрын
Thank you! Do you have a specific topic in mind you’d like me to cover?
@hanibal434 жыл бұрын
@@CodingWithChaim personally I would love to see a full react application using all the react features but as practical components something you would see in real life.
@hanibal434 жыл бұрын
Would even be great as a separate course explaining the behind the good of the js side
@capenburbank93073 жыл бұрын
new to programming here, but learning fast. This has been the best information so far and exactly what I've looked for! You explain everything in depth and it's really quite helpful, I'll be tuning in much more frequently from now on!
@CodingWithChaim3 жыл бұрын
Glad you find the content helpful
@henryho9523 жыл бұрын
Great Content! Thanks! Subscribed! :)
@josephmenasandoval34193 жыл бұрын
why you dont use rooms of socket io ? socket io has a buided function
@andresbr924 жыл бұрын
Very nice video. Thank you a lot
@CodingWithChaim4 жыл бұрын
You’re very welcome
@oyerindejoshua93652 жыл бұрын
pls where is the part two
@Lordaniel-K2 жыл бұрын
מדהים
@ashishafk3 жыл бұрын
can you please slow down a little its quite fast for me tbh. otherwise video is very helpful.
@kumar_sanjeevdutta10699 ай бұрын
Really great, but you speak too fast, I am native Hindi speaker and thank God KZbin has this slow video speed feature 🙏🙏
@rezaulmasum2054 жыл бұрын
Will you make any video on private chat ?
@CodingWithChaim4 жыл бұрын
Would you mind elaborating a little more about what you mean?
@rezaulmasum2054 жыл бұрын
@@CodingWithChaim Like there is a list of user in a chat room, but I would like to chat with an specific user. Private chat
@CodingWithChaim4 жыл бұрын
This video covers that too
@ayikkathilkarthik43123 жыл бұрын
That was an awesome explanation.
@martinn10713 жыл бұрын
Great stuff. Thanks! You might wanna add a beat in the background...it would also make a great rap improv.... Just saying.... Thanks again ! Cheers
@ikibkilam83833 жыл бұрын
Simply awesome! Quite easily, the best channel on youtube.
@CodingWithChaim3 жыл бұрын
Thank you!!
@x4r72 жыл бұрын
this is the first video where i need to slow down to 0.75
@milada4243 жыл бұрын
9:16 dude's a rap god
@evoqqqq3 жыл бұрын
Great tutorial! Could you please update the github repo because the code from part 1 & 2 is not included. Best regards, evoq!
@muhammadhamzahaneefqureshi50164 жыл бұрын
Millions subscribers on the way. Great stuff as usual. 😊
@CodingWithChaim4 жыл бұрын
Thanks! I sure hope so 😉
@shiffyfriedman71854 жыл бұрын
I agree! Great content!
@MrPoppshot3 ай бұрын
I thought my video was on 2x speed.
@softultraviolence56732 жыл бұрын
great video! But man, you sound like a texan auctioneer
@jcfiedalan81723 жыл бұрын
You can beat Eminem :)
@zxcyuu61413 жыл бұрын
Sir, your server.js on github is empty, i wanna know how callback function works.
@blameItleaveit Жыл бұрын
bro is rapping
@ikoLinh Жыл бұрын
hablas rapidísimo, pensé que sabia ingles😅
@lucifer43863 жыл бұрын
im trying to make a clone (on a small scale) of discord and believe me this really helped
@HeyNelsonn3 жыл бұрын
Could you teach us how to deploy these apps on Heroku?
@geraldomaga3 жыл бұрын
Are u sure that you belong to this planet earth?
@jackmiddleton20802 жыл бұрын
1337... My man.
@CodingWithChaim2 жыл бұрын
You’re the first person to comment on this easter egg