diff --git a/src/comm/comm.go b/src/comm/comm.go index 6064523..d3073be 100644 --- a/src/comm/comm.go +++ b/src/comm/comm.go @@ -43,8 +43,8 @@ func (c Comm) Write(b []byte) (int, error) { } func (c Comm) Read() (buf []byte, numBytes int, bs []byte, err error) { - // read until we get 7 bytes - tmp := make([]byte, 7) + // read until we get 8 bytes + tmp := make([]byte, 8) n, err := c.connection.Read(tmp) if err != nil { return @@ -58,7 +58,7 @@ func (c Comm) Read() (buf []byte, numBytes int, bs []byte, err error) { for { // see if we have enough bytes bs = bytes.Trim(bs, "\x00") - if len(bs) == 7 { + if len(bs) == 8 { break } n, err := c.connection.Read(tmp) diff --git a/src/models/constants.go b/src/models/constants.go index 1f37d78..c0bd9fa 100644 --- a/src/models/constants.go +++ b/src/models/constants.go @@ -1,4 +1,4 @@ package models const WEBSOCKET_BUFFER_SIZE = 1024 * 1024 * 32 -const TCP_BUFFER_SIZE = 1024 * 1024 +const TCP_BUFFER_SIZE = 1024 * 1024 * 32