How to Send and Receive UDP packets (in C)

preview_player
Показать описание
---
How to Send and Receive UDP packets (in C) // Most socket videos use stream sockets. In this one, I decided to look at how we send and receive UDP datagrams for those projects when you need a bit more control over how things flow through the network.

Related Videos:

***

Welcome! I post videos that help you learn to program and become a more confident software developer. I cover beginner-to-advanced systems topics ranging from network programming, threads, processes, operating systems, embedded systems and others. My goal is to help you get under-the-hood and better understand how computers work and how you can use them to become stronger students and more capable professional developers.

About me: I'm a computer scientist, electrical engineer, researcher, and teacher. I specialize in embedded systems, mobile computing, sensor networks, and the Internet of Things. I teach systems and networking courses at Clemson University, where I also lead the PERSIST research lab.

More about me and what I do:

To Support the Channel:
+ like, subscribe, spread the word

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

Nice vid! A raw sockets video would be super!
Also, it would be awesome to do a deep dive into the network stack, perhaps sk_buff?

Mronmovies
Автор

Legend, literally posted this the day my networking course starts and there's an assignment with UDP lol

rico_
Автор

Would love a video about unix and raw sockets.

mehregankbi
Автор

Very nice repeating so keep formula solid in your mind with time .

Barakatic
Автор

I think it is useful to include continuous receiving packets in the tutorial. Because it is used more often than receiving a single packet.

Albert-ydwh
Автор

Testing can also be done with socat or nc, both sending and receiving.

BLSrr
Автор

Cool video, but I've been always curious about the different ways to handle data coming through the network when it is larger than the defined the buffer. I do have an idea about maybe using fgets whith stdin for example to handle undefined data size but idk if it's the same case with data coming through a network socket.

ahmadshami
Автор

Thanks for your videos. My current main project is a network simulator so I'm generally interested in socket examples.
I'm wondering what happened to the datagram sent around 11:10? It wasn't received by the receiver program.

LarryEvilsizer
Автор

I seem to remember reading somewhere that connect can still be called for datagram sockets and that it has the effect of setting the default address for sending on that socket. Is that true?

MathematicsStudent
Автор

Need socket timeout also other method to remove blocking functionality

gunar
Автор

The check in this example needs to close the socket.

AaronMatlock