Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
WebSocketで遊んでみた / Go WebSocket
Search
chikuwa111
May 28, 2018
Programming
2
630
WebSocketで遊んでみた / Go WebSocket
Gopher道場#1 LT大会で発表した資料になります。実際に発表した資料に少し手を加えてあります。
chikuwa111
May 28, 2018
Tweet
Share
Other Decks in Programming
See All in Programming
AI & Enginnering
codelynx
0
110
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
380
360° Signals in Angular: Signal Forms with SignalStore & Resources @ngLondon 01/2026
manfredsteyer
PRO
0
120
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
4
530
生成AIを使ったコードレビューで定性的に品質カバー
chiilog
1
260
Smart Handoff/Pickup ガイド - Claude Code セッション管理
yukiigarashi
0
130
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
1
2.5k
今から始めるClaude Code超入門
448jp
8
8.6k
ThorVG Viewer In VS Code
nors
0
770
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
650
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
200
[KNOTS 2026登壇資料]AIで拡張‧交差する プロダクト開発のプロセス および携わるメンバーの役割
hisatake
0
280
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.3k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.3k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
420
Faster Mobile Websites
deanohume
310
31k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
210
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.6k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
430
The Cost Of JavaScript in 2023
addyosmani
55
9.5k
How Software Deployment tools have changed in the past 20 years
geshan
0
32k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
220
Transcript
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 ύϑΥʔϚϯεͷ࠷దԽ
͋Γ͕ͱ͏͍͟͝·ͨ͠