11 Star 11 Fork 0

Gitee 极速下载/goa

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/goadesign/goa
克隆/下载
websocket.go 890 Bytes
一键复制 编辑 原始数据 按行查看 历史
package http
import (
"context"
"net/http"
"github.com/gorilla/websocket"
)
type (
// Upgrader is an HTTP connection that is able to upgrade to websocket.
Upgrader interface {
// Upgrade upgrades the HTTP connection to the websocket protocol.
Upgrade(w http.ResponseWriter, r *http.Request, responseHeader http.Header) (*websocket.Conn, error)
}
// Dialer creates a websocket connection to a given URL.
Dialer interface {
// DialContext creates a client connection to the websocket server.
DialContext(ctx context.Context, url string, h http.Header) (*websocket.Conn, *http.Response, error)
}
// ConnConfigureFunc is used to configure a websocket connection with
// custom handlers. The cancel function cancels the request context when
// invoked in the configure function.
ConnConfigureFunc func(conn *websocket.Conn, cancel context.CancelFunc) *websocket.Conn
)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors/goa.git
git@gitee.com:mirrors/goa.git
mirrors
goa
goa
v2.0.3

搜索帮助