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

implemented EmbeddedChannel, LengthFieldPrepender, LengthFieldDecoder, and more #40

Merged
merged 1 commit into from
Nov 5, 2015

Conversation

Aaronontheweb
Copy link
Contributor

Somewhat large pull request because I needed to port over a bunch of pieces of infrastructure in order to match Netty's test suite...

  • Ported SwappedByteBuffer and implemented necessary tests and TO-DOs inside AbstractByteBuffer
  • Added additional methods to ByteBufferUtil to support SwappedByteBuffer
  • Ported AtomicReference to DotNetty.Common.Utilities from Helios
  • Implemented DotNetty.Common.Concurrency.AbstractEventExecutor and DotNetty.Common.Concurrency.AbstractScheduledEventExecutor - extracted a lot of stuff out of SingleThreadedEventExecutor in order to make that happen. Will need to integrate those changes back into it.
  • Fixed bug with AbstractChannelHandlerContext and deleted PipelinePropagationAttribute since we now use the same bitmasking schema that Netty does.
  • Implemented EmbeddedChannel (Implement EmbeddedChannel #3), EmbeddedEventLoop, and EmbeddedSocketAddress
  • Created DotNetty.Transport.Tests and ported all of the EmbeddedChannel tests that I can without implementing IEventLoop.Schedule needs to return a Task #35
  • Added LengthFrameDecoderTests and LengthFieldPrependerTests and have both passing.
  • Added LengthFieldPrepender

This pull request should make DotNetty wire-format compatible with Helios, which would allow for replacing the latter with the former inside Akka.NET. I haven't tested that yet, but it should be easily doable now.

/// </summary>
public static int SwapInt(int value)
{
byte[] bytes = BitConverter.GetBytes(value);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please replace with in-place bit shift-based operations, Check http://referencesource.microsoft.com/#System/net/System/Net/IPAddress.cs,aa84b64c78670092 (#else part)

@nayato
Copy link
Member

nayato commented Oct 15, 2015

I went through a good part today, will do the rest tomorrow.

@Aaronontheweb
Copy link
Contributor Author

Updated with latest changes

{
IRunnable task = this.PollScheduledTask(time);
if (task == null)
return this.NextScheduledTaskNanos();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

formatting

brought AbstractContextHandler up to code
EmbeddedChannelTest passes
fixed LengthFieldBasedFrameDecoder
finished LengthFieldPrepender
finished SwappedByteBuffer
@Aaronontheweb
Copy link
Contributor Author

@nayato reformatted all code and changed the access modified on AbstractUnsafe to protected. PR should be complete after CI check.

nayato added a commit that referenced this pull request Nov 5, 2015
implemented EmbeddedChannel, LengthFieldPrepender, LengthFieldDecoder, and more
@nayato nayato merged commit a9c759b into Azure:dev Nov 5, 2015
@Aaronontheweb Aaronontheweb deleted the lengthframedecodertests branch November 13, 2015 23:11
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