6 Commits
Author SHA1 Message Date
Johnny Z 33b95cfe61 Buffer read/write/get/set strings. (#369)
Motivation:
Implement commonly used string-based operations (originally Netty CharSequence) for byte buffers.

Modifications:
Added read/write/get/set strings methods to byte buffers.
Also reduced unsafe pin/unpins for byte operations.

Result:
String-based operations are supported in DotNetty
2018-03-15 14:58:49 -07:00
Max Gortman 8114b7fb21 Fixing minor issues and code style throughout
Motivation:
Modern language features provide for easier to read, more compact code.

Modifications:
- expression body for single line methods
- Extra: fixes in xml docs
- Extra: code style deviations in recent commits

Result:
Cleaner, more consistent code.
2016-05-13 12:18:04 -07:00
Max Gortman 47163fde8d switching to C# 6.0 2016-05-05 01:19:49 -07:00
mgortman d5a4c30778 Adds IEventExecutor.Schedule, proper cancellation of scheduled tasks
Motivation:
Allow for less GC when scheduling if Task-based API is not required. Allow for proper cleanup when canceling scheduled task so that associated resources can be cleaned up early.

Modifications:
- Moved out scheduled task implementations from AbstractScheduledEventExecutor
- Introduced IScheduledTask and aligned IScheduledRunnable
- Implemented removal of scheduled task upon its cancellation
- Extra minor fixes
 - IByteBuffer.ToString(Encoding) honoring ArrayOffset
 - InternalLoggerFactory creating default logging factory lazily

Result:
Scheduled tasks that normally never fire (e.g. timeout handling) do not cause resources to be held up unnecessarily in memory for longer period of time if not necessary.
2016-04-05 19:17:46 -07:00
mgortman 583c63150c Aligning Event Executors API
Motivation:
Better align Event Executors with netty (Schedule and Submit methods) and remove redundancy in SingleThreadEventExecutor

Modifications:
- changed Schedule method overloads to return Task and therefore also renamed it to ScheduleAsync
- changed Submit method overloads to work with Func<T> -> Task<T>
- updated SingleThreadEventExecutor to inherit from AbstractSchedulingEventExecutor

extras
- added support for cancellation in scheduled tasks
- fixed ExecutorTaskScheduler.TryDequeue and related functionality

Results:
- SingleThreadEventExecutor is part of Event Executor hierarchy
- It is easier to port / implement functionality that relies on continuations for ScheduleAsync or result of SubmitAsync's future.
2015-11-15 02:14:41 -08:00
Aaron Stannard 2f3cef46d7 implemented embedded channel close #3
brought AbstractContextHandler up to code
EmbeddedChannelTest passes
fixed LengthFieldBasedFrameDecoder
finished LengthFieldPrepender
finished SwappedByteBuffer
2015-11-05 09:39:21 -08:00