-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New docs website #63
Comments
When will version 4.0 be ready |
Netly 4.0 is almost ready. The only thing left is to perform unit tests for HTTP, RUDP, and WebSocket. While I’ve already found and fixed some bugs during personal usage, it’s essential to cover all possible use cases and validate behavior with automated tests. The delay isn’t due to a lack of time but rather a lack of motivation. I want to ensure the version is stable and reliable before the official release. So, Netly 4.0 will be released as soon as all tests pass successfully. |
Hi alec1o, first of all, thank you for the library! It's really handy and very clean, I'm having a great time using it. Server (C#) <-> Client (Unity) The link between C# <> Unity works perfectly, everything is sent and received flawlessly (of course, it's the same library). Would you be able to help me with this? |
Hi @Drethek, Thanks for liking this library! <3 Regarding your question, sending and receiving events is quite straightforward. Essentially, you need to include some "prefix" bytes before your actual data to allow Netly to detect if your data is "normal (RAW)" or "custom (EVENT)". Source (Event: Creation and Verification): Netly/src/netly/partials/NetlyEnvironment.EventManager.cs Lines 12 to 36 in ca15f40
For example, before sending a buffer via TCP, UDP, RUDP, etc., we create a new buffer using Example usage: using Byter;
using Netly;
// SEND
byte[] rawBuffer = "Hello World".GetBytes();
string eventName = "welcome";
// Note: (NetlyEnvironment) is available on v4.0.0 and later; older versions use (EventManager)
byte[] finalBuffer = NetlyEnvironment.EventManager.Create(eventName, rawBuffer);
// Socket.Send(finalBuffer)
// The final buffer is the data sent when using events.
// RECEIVE
byte[] rawReceivedBuffer = ...;
// Detect if the data is an event or not.
(string name, byte[] data) result = NetlyEnvironment.EventManager.Verify(rawReceivedBuffer);
if (result.data == null || result.data.Length <= 0)
{
Console.WriteLine($"RAW DATA RECEIVED: {rawReceivedBuffer.GetString()}");
}
else
{
Console.WriteLine($"EVENT RECEIVED ({result.name}): {result.data.GetString()}");
} I believe if the .NET side sends an event, your TypeScript application might see it as "broken" (e.g., "Ny://" and broken words, after the event name and buffer if it is UTF-8 encoded). If you encounter any issues while reimplementing EventManager on the TypeScript side, feel free to open an issue for assistance. Please share your TypeScript socket source so I can use it as a base to implement a seamless API for EventManager in TypeScript |
Now [09/14/2024] netly.docs.kezero.com website is offline and not acessible, this reason that's why is going be hard deployment of new website version.
The new website version is working fine but Docusauros can't build it static because generated markdown conflict with docusauros (i don't know why). I tried deploy website on vercel, render.
New website
This website have included content of version 3.1.x api and manual, use drop down with
4.0.0
and select3.1.0
Old website
The text was updated successfully, but these errors were encountered: