Open yyjdelete opened 6 years ago
What do you mean? datagram bytes are sent by io/array buffers https://github.com/Azure/DotNetty/blob/dev/src/DotNetty.Transport/Channels/Sockets/SocketDatagramChannel.cs#L194 When FinishWrite gets called, the io buffers in the output gets cleared.
https://github.com/Azure/DotNetty/blob/dev/src/DotNetty.Transport/Channels/Sockets/SocketDatagramChannel.cs#L180 expected an IAddressedEnvelope<IByteBuffer>
but FinishWrite
call ChannelOutboundBuffer.RemoveBytes(int)
which only work with IByteBuffer
.
https://github.com/Azure/DotNetty/blob/dev/src/DotNetty.Transport/Channels/Sockets/AbstractSocketChannel.cs#L412
@yyjdelete the point is that it does not need to do anything for IAddressedEnvelope
@StormHub
Maybe an assert failure here, and the IAddressedEnvelope
will not be removed properly?(Unable to make an test to hit the path)
An missing link: https://github.com/Azure/DotNetty/blob/dev/src/DotNetty.Transport/Channels/ChannelOutboundBuffer.cs#L289-L293
Callback of it is
AbstractSocketChannel.AbstractSocketUnsafe.FinishWrite
, but it callinput.RemoveBytes
and which only handle the case ofIByteBuffer
instead ofIAddressedEnvelope<IByteBuffer>