mirror of
https://github.com/slackhq/nebula.git
synced 2026-11-17 10:16:52 +01:00
handshake/fec: Encode a message from its own bytes, copying only a padded last symbol
This commit is contained in:
1 parent
cbcf441d7c
commit
05410034e3
2 files changed
+8
-5
No files matched your search
@@ -34,7 +34,8 @@ type Sender struct {
|
||||
}
|
||||
|
||||
// NewSender prepares msg for sending. subtype, remoteIndex and counter fill the
|
||||
// Nebula header of every fragment; fragID is the sender's local index.
|
||||
// Nebula header of every fragment; fragID is the sender's local index. The
|
||||
// Sender keeps msg, which must not change while it is in use.
|
||||
func NewSender(msg []byte, subtype header.MessageSubType, remoteIndex uint32, counter uint64, fragID uint32) (*Sender, error) {
|
||||
if len(msg) == 0 || len(msg) > math.MaxUint16 {
|
||||
return nil, ErrMsgLen
|
||||
|
||||
Reference in new issue
Block a user