HTTP Server on random available port in Go | Kazuki Higashiguchi | Conf42 Golang 2022
Imagine you want to start an HTTP server without specifying the port. For example, a temporary server for testing. How do you do that?
The answer is straightforward. Specify the port number to 0 like:
l, err := (““tcp““, ““:0““)
It’s an easy rule provided by the net package, but do you understand how Go binds a random port allocation.
I’ll give you a clear understanding of what Go does inside the net package.
The presentation contains the following topics.
- net, net/http packages
- File descriptor
- TCP, UDP
- System calls
I think this presentation will give audiences not only a knowledge of Go, but also one of system calls.
Other talks at this conference 🚀🪐
—
0:00 Intro
1:12 Talk
1 view
4113
1540
6 days ago 00:25:36 9
ПОБЕГ С ЛЕДЯНОГО ОСТРОВА ПО ТОНКОМУ ЛЬДУ В GTA SAMP | STRAYF | Реакция
1 week ago 00:06:49 1
Imminence - “The Black“ LIVE! The Black Tour
2 weeks ago 00:11:36 1
GammaOS Core overview (with Miyoo Flip)
2 weeks ago 00:52:01 12
NEHRIM • ОБЛИВИОН НА МАКСИМАЛКАХ
2 weeks ago 00:00:00 1
РОДИНА РП - ЮЖНЫЙ ОКРУГ! ЛАМПОВЫЙ СТРИМЧИК ДЛЯ ЧЁТКИХ БРАТИШЕК! ПРОДВИГАЕМСЯ НА СЕРВЕРЕ!
2 weeks ago 00:24:22 1
МОДУЛЬНАЯ СИСТЕМА ШЛЕМОВ И КОСТЮМОВ. STALKER ANOMALY СБОРКА REDUX 2.0 ХОД РАЗРАБОТКИ(2024).Ч.1
2 weeks ago 00:02:52 7
방탄소년단 SBS 가요대전 performance practice
2 weeks ago 00:53:47 1
Derail Valley - Разблокировал музей локомотивов. Поедем посмотрим? - Часть 3
2 weeks ago 00:54:01 1
Derail Valley _ Занимаюсь грузоперевозками _ Часть 2
3 weeks ago 00:25:04 2
Я стал СВЯЩЕННИКОМ (добрым)
3 weeks ago 00:10:40 1
PUBG MOBILE - LIGHTSPEED VS TIMI STUDIO ( ULTRA GRAPHICS COMPARISON )