Introduce configurable buffer size
This commit is contained in:
parent
9924771531
commit
0bb19ba8bd
4 changed files with 23 additions and 5 deletions
|
|
@ -46,7 +46,13 @@ func main() {
|
|||
responseChannel := make(chan *datastructures.SignerResponse, 1)
|
||||
|
||||
readWriteCloser := (io.ReadWriteCloser)(port)
|
||||
protocolHandler := protocol.NewProtocolHandler(requestChannel, &responseChannel, &readWriteCloser)
|
||||
clientProtocolConfig := protocol.NewSignerProtocolConfig()
|
||||
if clientConfig.BufferSize != 0 {
|
||||
clientProtocolConfig.BufferSize = int(clientConfig.BufferSize)
|
||||
}
|
||||
protocolHandler := protocol.NewProtocolHandler(
|
||||
requestChannel, &responseChannel, &readWriteCloser, clientProtocolConfig,
|
||||
)
|
||||
|
||||
cancelChannel := make(chan os.Signal, 1)
|
||||
signal.Notify(cancelChannel, syscall.SIGTERM, syscall.SIGINT)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue