Skip to content

Fixed DotNetty#22

Open
s074 wants to merge 5 commits intoSledmore:nettyfrom
s074:netty
Open

Fixed DotNetty#22
s074 wants to merge 5 commits intoSledmore:nettyfrom
s074:netty

Conversation

@s074
Copy link
Contributor

@s074 s074 commented Sep 10, 2020

Fixed a couple of bugs, including:

  • Packets are now decoded into frames properly. Used LengthFieldBasedFrameDecoder for decoding individual packets.
  • When sending the same packet to multiple clients, such as in the BroadcastPacket method, the refCount in the message buffer would get decreased to 0. To fix this issue I had to completely refactor the way outgoing messages are handled. Now ServerPacket implements the IByteBuffHolder interface and holds the outgoing message buffer. The message composers will not hold the message buffer anymore, they now extend from MessageComposer instead, which just provides a method for writing the packet to the ServerPacket buffer.

One thing to note though was that features such as restriction of connections per IP were not implemented. Maybe will do that in another PR.

@Diddyy
Copy link
Contributor

Diddyy commented Sep 10, 2020

I've tested this on localhost, works flawlessly as expected. No breaking changes as a result.
+1 for this!
@Sledmore

@dotmbf
Copy link
Collaborator

dotmbf commented Sep 14, 2020

Hey, first chance I get I'll check this out.

@Sledmore
Copy link
Owner

Awesome, I'll give this a look sometime tonight before merging it - but thanks for your contribution!

@IDjinn
Copy link

IDjinn commented Dec 23, 2020

I didn't knew this repo was some users contributing to it... Maybe I make some here some my edits to better performance code

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.

5 participants