METADAPT-B supports setting a message length limit
This commit is contained in:
@@ -3,6 +3,8 @@ package hopp
|
||||
import "net"
|
||||
// import "time"
|
||||
|
||||
const defaultSizeLimit = 1024 * 1024 // 1 megabyte
|
||||
|
||||
// Conn is a HOPP connection.
|
||||
type Conn interface {
|
||||
// Close closes the connection. Any blocked operations on the connection
|
||||
@@ -19,6 +21,10 @@ type Conn interface {
|
||||
// AcceptTrans accepts a transaction from the other party. This must
|
||||
// be called in a loop to avoid the connection locking up.
|
||||
AcceptTrans() (Trans, error)
|
||||
|
||||
// SetSizeLimit sets a limit (in bytes) for how large messages can be.
|
||||
// By default, this limit is 1 megabyte.
|
||||
SetSizeLimit(limit int)
|
||||
}
|
||||
|
||||
// Trans is a HOPP transaction.
|
||||
|
||||
Reference in New Issue
Block a user