diff --git a/Gopkg.lock b/Gopkg.lock index 8b3c81e..fedb12e 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -47,7 +47,7 @@ "socket/web", "socket/web/client" ] - revision = "20a63b3de6efdc0942bfb4be21ddc64e2b76f59d" + revision = "cbe8e30db48a21b33650c5ed7e7d8bbf4784c9d4" [[projects]] branch = "master" @@ -87,7 +87,7 @@ "model/sensorconfig", "service/probe" ] - revision = "7e2ff26648aefbafaee2ca28c1a958332ae4c6f9" + revision = "54725b74e13a501d7a13a76a82c294769729748d" [[projects]] name = "github.com/BurntSushi/toml" @@ -133,14 +133,23 @@ version = "v1.1" [[projects]] - branch = "master" name = "github.com/shirou/gopsutil" packages = [ + "cpu", "host", "internal/common", + "mem", + "net", "process" ] revision = "4a180b209f5f494e5923cfce81ea30ba23915877" + version = "v2.18.06" + +[[projects]] + branch = "master" + name = "github.com/shirou/w32" + packages = ["."] + revision = "bb4de0191aa41b5507caa14b0650cdbddcd9280b" [[projects]] name = "github.com/valyala/fasthttp" diff --git a/_build/bin/config.json b/_build/bin/config.json index cfae06d..4d0bc26 100644 --- a/_build/bin/config.json +++ b/_build/bin/config.json @@ -8,13 +8,14 @@ "connector": { "reconnectInterval": 5, "reconnectTryTime": 10, - "maxMessageSize": 4096, - "readBufferSize": 4096, - "writeBufferSize": 4096, + "maxMessageSize": 8192, + "readBufferSize": 8192, + "writeBufferSize": 8192, "pongTimeout": 60, "pingTimeout": 10, "pingPeriod": 9, - "compressionThreshold": 8192 + "enableCompression": false, + "compressionThreshold": 4096 } }, "probe": { diff --git a/client/client.go b/client/client.go index f19ffa1..c6cb2c8 100644 --- a/client/client.go +++ b/client/client.go @@ -8,7 +8,7 @@ import ( ) func New(name string, connector cssc.Connector, services []interface{}) *crc.Client { - codec := crpj.NewClientCodec() + codec := crpj.NewCustomClientCodec(crc.NewCompressionCodecSelector(connector.GetCompressionThreshold())) var rpcRegistry crr.RPCRegistry if nil != services && 0 < len(services) {