ing
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
|
||||
"git.loafle.net/commons_go/logging"
|
||||
"git.loafle.net/overflow/overflow_probes/central/client/protocol"
|
||||
"git.loafle.net/overflow/overflow_probes/config"
|
||||
"github.com/gorilla/websocket"
|
||||
)
|
||||
|
||||
@@ -51,7 +52,7 @@ func (c *Call) done() {
|
||||
}
|
||||
|
||||
type Client interface {
|
||||
Dial(url string, header http.Header, readBufSize int, writeBufSize int) (*http.Response, error)
|
||||
Dial(url string, header http.Header) (*http.Response, error)
|
||||
Call(method string, args []string, result interface{}) error
|
||||
Notify(method string, args []string) error
|
||||
OnNotify(cb OnNotifyFunc)
|
||||
@@ -83,13 +84,13 @@ func New() Client {
|
||||
return c
|
||||
}
|
||||
|
||||
func (c *client) Dial(url string, header http.Header, readBufSize int, writeBufSize int) (*http.Response, error) {
|
||||
func (c *client) Dial(url string, header http.Header) (*http.Response, error) {
|
||||
var err error
|
||||
var res *http.Response
|
||||
|
||||
dialer := websocket.Dialer{
|
||||
ReadBufferSize: readBufSize,
|
||||
WriteBufferSize: writeBufSize,
|
||||
ReadBufferSize: config.CFG.Central.ReadBufferSize,
|
||||
WriteBufferSize: config.CFG.Central.WriteBufferSize,
|
||||
}
|
||||
|
||||
if c.conn, res, err = dialer.Dial(url, header); nil != err {
|
||||
|
||||
Reference in New Issue
Block a user