Skip to content

Enforce payload size limit on sent message #114

Closed
@gdnathan

Description

@gdnathan

Following up discussion on #112 .

"To actually enforce the limit, we could do something like this maybe:
src/network/wire/lib.zig

const MAX_PAYLOAD_SIZE: u32 = 32 * 1024 * 1024

const payload_len: u32 = @intCast(payload.len);
if (payload_len > MAX_PAYLOAD_SIZE) {
    return someerror
}

"

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions