Skip to content

Conversation

popcron
Copy link
Contributor

@popcron popcron commented May 16, 2025

the availability of span overloads is great and really useful. there was just a few missing API that i need for my work:

  • connecting with a span of bytes (2b0d8c0)
Span<byte> connectionData = stackalloc byte[32];
//write data into connectionData manually
NetManager client = new();
client.Start();
client.Connect("localhost", 1337, connectionData);
  • putting a span of bytes into a NetDataWriter (2eb2cbe)
Span<byte> messageData = stackalloc byte[32];
NetDataWriter netWriter = new();
netWriter.Put(messageData);
netPeer.Send(netWriter, DeliveryMethod.ReliableOrdered);

tests were also added to check sanity check both under the NET5_0_OR_GREATER flags

@RevenantX RevenantX merged commit 7136900 into RevenantX:master Jul 1, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants