Skip to content

Commit

Permalink
Increase max request and response size from 1024 bytes to 2 MB
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldix committed Jan 7, 2014
1 parent ff67c8b commit 7c2b436
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/coordinator/protobuf_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ type runningRequest struct {

const (
REQUEST_RETRY_ATTEMPTS = 3
MAX_RESPONSE_SIZE = 1024
MAX_RESPONSE_SIZE = MAX_REQUEST_SIZE
IS_RECONNECTING = uint32(1)
IS_CONNECTED = uint32(0)
MAX_REQUEST_TIME = time.Second * 1200
Expand Down
4 changes: 3 additions & 1 deletion src/coordinator/protobuf_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ type ProtobufServer struct {
connectionMap map[net.Conn]bool
}

const MAX_REQUEST_SIZE = 1024
const KILOBYTE = 1024
const MEGABYTE = 1024 * KILOBYTE
const MAX_REQUEST_SIZE = MEGABYTE * 2

func NewProtobufServer(port string, requestHandler RequestHandler) *ProtobufServer {
server := &ProtobufServer{port: port, requestHandler: requestHandler, connectionMap: make(map[net.Conn]bool)}
Expand Down

0 comments on commit 7c2b436

Please sign in to comment.