forked from grpc/grpc-web
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option to enabled websocket keepalive pinging (grpc#546)
* 增加websocket超时发送ping,以适配nginx的websocket代理 * Update go/grpcweb/websocket_wrapper.go Co-Authored-By: Johan Brandhorst <[email protected]> * Update go/grpcweb/websocket_wrapper.go Co-Authored-By: Johan Brandhorst <[email protected]> * Update go/grpcweb/websocket_wrapper.go Co-Authored-By: Johan Brandhorst <[email protected]> * 添加使能websocket超时ping函数,tickerCount增加互斥锁 * 调整互斥锁解锁位置 * 简单处理,使代码更易读 * 增加配置websocket发送ping的超时时间的功能 * 增加配置websocket发送ping的超时时间的功能 * 1.将wsConn.SetCloseHandler移到了EnablePing中; 2.使用timer.Reset()代替tickerCount计时与复位; 3.其他设置上的提示优化; * 将timer改为ticker * use logrus.Infof to get string interpolation * 使用第三方timer包实现精确的超时间隔发送Ping * Update go/grpcweb/options.go Co-Authored-By: Johan Brandhorst <[email protected]> * Update the document * use godocdown to generate the latest documentation
- Loading branch information
1 parent
67a6f66
commit 4529aac
Showing
5 changed files
with
74 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters