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
610
WebSocketで遊んでみた / Go WebSocket
Gopher道場#1 LT大会で発表した資料になります。実際に発表した資料に少し手を加えてあります。
chikuwa111
May 28, 2018
Tweet
Share
Other Decks in Programming
See All in Programming
おやつのお供はお決まりですか?@WWDC25 Recap -Japan-\(region).swift
shingangan
0
140
PicoRuby on Rails
makicamel
2
140
Deep Dive into ~/.claude/projects
hiragram
14
11k
オンコール⼊⾨〜ページャーが鳴る前に、あなたが備えられること〜 / Before The Pager Rings
yktakaha4
1
770
猫と暮らす Google Nest Cam生活🐈 / WebRTC with Google Nest Cam
yutailang0119
0
160
Agentic Coding: The Future of Software Development with Agents
mitsuhiko
0
120
たった 1 枚の PHP ファイルで実装する MCP サーバ / MCP Server with Vanilla PHP
okashoi
1
280
イベントストーミング図からコードへの変換手順 / Procedure for Converting Event Storming Diagrams to Code
nrslib
2
970
TypeScriptでDXを上げろ! Hono編
yusukebe
3
650
技術同人誌をMCP Serverにしてみた
74th
1
680
LT 2025-06-30: プロダクトエンジニアの役割
yamamotok
0
810
Railsアプリケーションと パフォーマンスチューニング ー 秒間5万リクエストの モバイルオーダーシステムを支える事例 ー Rubyセミナー 大阪
falcon8823
5
1.4k
Featured
See All Featured
Side Projects
sachag
455
42k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
130
19k
Building an army of robots
kneath
306
45k
Raft: Consensus for Rubyists
vanstee
140
7k
A Modern Web Designer's Workflow
chriscoyier
695
190k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.4k
Mobile First: as difficult as doing things right
swwweet
223
9.7k
Optimizing for Happiness
mojombo
379
70k
Embracing the Ebb and Flow
colly
86
4.7k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
Gamification - CAS2011
davidbonilla
81
5.4k
Done Done
chrislema
184
16k
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 ύϑΥʔϚϯεͷ࠷దԽ
͋Γ͕ͱ͏͍͟͝·ͨ͠