Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
WebSocketで遊んでみた / Go WebSocket
Search
chikuwa111
May 28, 2018
Programming
670
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
WebSocketで遊んでみた / Go WebSocket
Gopher道場#1 LT大会で発表した資料になります。実際に発表した資料に少し手を加えてあります。
chikuwa111
May 28, 2018
Transcript
14 slides
8FC4PDLFUͰ༡ΜͰΈͨ ྠढ़Ұ
ࣗݾհ w ྠढ़Ұ ͚ͨΘ w େֶੜ w ʮͪ͘ΘʯͱݺΕͯ·͢ w
ॳ-5
8FC4PDLFUͰ༡ΜͰΈͨ
(Pͷ8FC4PDLFUࣄ w HPMBOHPSHYOFUXFCTPDLFU w 5IJTQBDLBHFDVSSFOUMZMBDLTTPNFGFBUVSFT GPVOEJOBMUFSOBUJWFBOENPSFBDUJWFMZNBJOUBJOFE 8FC4PDLFUQBDLBHF w HJUIVCDPNHPSJMMBXFCTPDLFU
HPSJMMBXFCTPDLFU w 4FOEDMPTFNFTTBHF w 4FOEQJOHTBOESFDFJWFQPOHT w $PNQSFTTJPO &YQFSJNFOUBM w
3FBENFTTBHFVTJOHJP3FBEFS w 8SJUFNFTTBHFVTJOHJP8SJUF$MPTFS
func Echo(ws *websocket.Conn) { for { var reply string if
err := websocket.Message.Receive(ws, &reply); err != nil { fmt.Println("Receive failed: ", err) break } if err := websocket.Message.Send(ws, reply); err != nil { fmt.Println("Send failed: ", err) break } } } func main() { http.Handle("/", websocket.Handler(Echo)) if err := http.ListenAndServe(":8080", nil); err != nil { log.Fatal("ListenAndServe:", err) } }
༡ΜͰΈͨ νϟοτػೳ
IFSPLVʹ͋͛·ͨ͠ 63-ൿີ
ͭͬͨ͘ͷ w ͨͩͷνϟοτػೳ w શମͰͻͱͭͷ෦Λڞ༗͍ͯ͠Δ w HJUIVCDPNHPSJMMBXFCTPDLFUUSFFNBTUFS FYBNQMFTDIBUΛࢀߟʹ͠·ͨ͠
ͭͬͨ͘ͷ )6# ೖࣨɾୀࣨɾ ϝοηʔδͷཧ 4FSWFS ड৴ͷཧ ૹ৴ͷཧ JOJU QFSDPOOFDUJPO
ຊʹΓ͔ͨͬͨ͜ͱ
ෳͷ෦Λͭ͘Δ )6# ೖࣨɾୀࣨɾ ϝοηʔδͷཧ 4FSWFS ड৴ͷཧ ૹ৴ͷཧ QFSDPOOFDUJPO
ཁղܾϙΠϯτ w ෦ͷཧ w ೖࣨͷड͚ೖΕঢ়ଶͷཧ w ਓͷ෦ͷআ w ύϑΥʔϚϯεͷ࠷దԽ
͋Γ͕ͱ͏͍͟͝·ͨ͠
Other Decks in Programming
See All in Programming
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
150
コード生成時代のAPI定義を支えるRequest Spec移行
pvcresin
0
300
Skills Are the New npm [AAIF Bengaluru, Nov 2026]
shivamsaraswat
0
130
高橋メソッドでCVE解説シリーズ 〜CVE-2026-112816〜
hakkadaikon
0
280
Claude Code ハーネスDeep Dive – 君はどこまで制御する? -
takateeen_knj
6
6.3k
数行の変更でDockerビルドを最大91%高速化~GitLab CIの実行基盤を社内40リポジトリに展開するまで~
picopico
3
680
imagewebp()の向こう側: WebPはなぜ JPEG・PNGより軽いのか
yuzneri
0
150
AI時代のIaC入門 〜なぜインフラをコードで管理したいのか?〜 / Introduction to IaC in the AI Era
akihisaikeda
6
1.6k
手の動かし方がわからなかった私が個人開発者になるまで
usagi0920_pochi
0
340
Math.sumPreciseから学ぶ、ECMAScript仕様の数値の種類
syumai
0
200
AI時代のシニアエンジニアとは
yosuke_furukawa
PRO
15
12k
LLM 101: Exploring LLMs, Starting with Tokens.
dalinaum
0
120
Featured
See All Featured
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
520
Reflections from 52 weeks, 52 projects
jeffersonlam
356
22k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
77k
The Language of Interfaces
destraynor
163
27k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
470
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
700
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
610
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
620
Well, that’s weird…
csswizardry
1
230
Making the Leap to Tech Lead
cromwellryan
135
10k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
360
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
6
970