Skip to content
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

I need to keep a log of the original communication, can I do it? #137

Open
watking opened this issue Nov 22, 2024 · 2 comments
Open

I need to keep a log of the original communication, can I do it? #137

watking opened this issue Nov 22, 2024 · 2 comments

Comments

@watking
Copy link

watking commented Nov 22, 2024

This project is great, I want to integrate it into my project, but I need to keep all the incoming and feedback data streams, can I do that? Achieve the same effect as the image
image

@Apollo3zehn
Copy link
Owner

This is slightly related to #133.

I see the need for this but from a performance perspective (and this library is for high performance), it is difficult to implement.

Maybe there should be a global switch to enable this feature and if it is enabled, an event is raised with the frame buffer as parameter. Something like this but for the client side:

grafik

For received data, this event would need to be raised right before this line:

var rawFunctionCode = reader.ReadByte();

And it would look like this:

if (EnableRaisingEvents)
    FrameReceived?.Invoke(this, new FrameReceivedEventArgs(frameBuffer.Buffer));

// ...

And then something similar for the frame data to be sent which would be right before this line:

_networkStream.Write(frameBuffer.Buffer, 0, frameLength);

So if you have time I would happily accept a merge request. Unfortunately I am busy with other projects right now so I cannot do it myself :-(

@watking
Copy link
Author

watking commented Nov 23, 2024

Thank you very much for your reply, I'm willing to try it, this feature can be used for data review

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

No branches or pull requests

2 participants