You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
package main import ( "code.google.com/p/go.net/websocket" "io" "net/http" ) func echoHandler(ws *websocket.Conn) { io.Copy(ws, ws) } func main() { http.Handle("/echo", websocket.Handler(echoHandler)) http.Handle("/", http.FileServer(http.Dir("./"))) if err := http.ListenAndServe(":9999", nil); err != nil { panic("ListenAndServe: " + err.Error()) } } <html> <head> <title>websocket sample</title> <
Golang の勉強がてらちょっとしたツールを作ろうと思って、まず websocket サーバーを書いてみた。 書いてみたと言っても go の websocket chat は golang-samples/websocket · GitHub ここにサンプルがあって、これをそのまま使っても良かったのだけれどいくつか気になったのでよりシンプルに書き直してみた。 hatz48/go-websocket-sample · GitHub 気になったのは二つあって、一個は client id が競合しそうに見えた点。 https://github.com/golang-samples/websocket/blob/master/websocket-chat/src/chat/client.go#L35 ここで maxId をインクリメントしている. この NewClient 関数は https:/
Data ScienceRevamping Data Science InterviewsInterviews are not just about improving hiring outcomes - they are about strengt... EngineeringRoBERTa Model for Merchant Categorization at Squar...Harnessing Large Language Models to Deliver Accurate Business Insights EngineeringAn analysis of the Square and Cash App outageService Disruption - Public Postmortem [2025/02/26]
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く