mirror of
https://git.robbyzambito.me/zaprus/
synced 2026-02-04 11:44:49 +00:00
This commit is contained in:
@@ -32,7 +32,7 @@ pub const MessageParseError = MessageTypeError || error{
|
||||
// &payload could be a void value that is treated as a pointer to a [*]u8
|
||||
/// All Saprus messages
|
||||
pub const Message = packed struct {
|
||||
const Relay = packed struct {
|
||||
pub const Relay = packed struct {
|
||||
dest: @Vector(4, u8),
|
||||
payload: void,
|
||||
|
||||
@@ -41,7 +41,7 @@ pub const Message = packed struct {
|
||||
return @as([*]u8, @ptrCast(&self.payload))[0 .. len.* - @bitSizeOf(Relay) / 8];
|
||||
}
|
||||
};
|
||||
const Connection = packed struct {
|
||||
pub const Connection = packed struct {
|
||||
src_port: u16, // random number > 1024
|
||||
dest_port: u16, // random number > 1024
|
||||
seq_num: u32 = 0,
|
||||
|
||||
Reference in New Issue
Block a user