Skip to content

Commit

Permalink
TCP fragment max set to 1MiB
Browse files Browse the repository at this point in the history
  • Loading branch information
lory committed Mar 27, 2024
1 parent 5f29740 commit 203ae4f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tcpsock/tcp_socket.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (s *socket) Recv(length int) (msg *api.SockMessage, err error) {
var recv, left int
if length <= 0 {
once = true
length = types.PACK_FRAGMENT_MAX
length = types.TCP_FRAGMENT_MAX
}
left = length
data := s.makeBuffer(length)
Expand Down
1 change: 1 addition & 0 deletions types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const (

const (
PACK_FRAGMENT_MAX = 1500
TCP_FRAGMENT_MAX = 1024 * 1024
)

const (
Expand Down

0 comments on commit 203ae4f

Please sign in to comment.