Azure / DotNetty

DotNetty project – a port of netty, event-driven asynchronous network application framework
Other
4.09k stars 977 forks source link

Implement Socket-based UDP channel #79

Closed nayato closed 7 years ago

nayato commented 8 years ago

port netty's NioDatagramChannel (https://github.com/netty/netty/blob/4.1/transport/src/main/java/io/netty/channel/socket/nio/NioDatagramChannel.java) derived from AbstractSocketMessageChannel.

startemplar commented 8 years ago

Support for Socket-based UDP channel in AbstractSocketChannel.OnIoCompleted

The method is called after an async socket operation completed. Currently the SocketAsyncOperation.Receive, SocketAsyncOperation.Send for TCP. However, UDP uses ReceiveFrom, SendTo pattern so we need to add support here, like case SocketAsyncOperation.ReceiveFrom: case SocketAsyncOperation.SendTo:

Thank for your comment/suggestions.

StormHub commented 8 years ago

I am porting/re-implementing UDP channel.

nayato commented 8 years ago

@StormHub you may be interested in @onatm's progress on this: https://github.com/onatm/DotNetty/tree/implement-socket-based-udp-channel

onatm commented 8 years ago

@nayato @StormHub i couldn't make so much progress since i started but i'll be happy to help

StormHub commented 8 years ago

It's ok. With UDP I almost have exactly the same functions as original Netty :)

StormHub commented 7 years ago

Current progress on https://github.com/StormHub/DotNetty/tree/UDP Should I create some benchmark on the channel?

StormHub commented 7 years ago

Initial implementation is roughly done now.

StormHub commented 7 years ago

@nayato probably start another PR for this soon. I am running UDP channel in real world and how it goes.

StormHub commented 7 years ago

Sorry for more extra work load for you :)

StormHub commented 7 years ago

@nayato DatagramChannel final change set before PR. Anything you see I probably missed?

StormHub commented 7 years ago

PR #171 created, please review.

nayato commented 7 years ago

Implemented through #171