EmbeddedChannel is working incorrectly.
- Dominant language
- C#
- Stars
- 4.3k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
As I mentioned in #196, I use EmbeddedChannel to encode and decode Protobuf and the opcode.
But it seems that the implementation in DotNetty is different or with some bug.
In Java, both are working.
DimensionStoryDecoder is a MessageToMessageDecoder.
```
private EmbeddedChannel _embeddedChannel1 = new EmbeddedChannel();
public object Decode(ByteString message)
{
_embeddedChannel1.Pipeline.AddLast(new DimensionStoryDecoder());
_embeddedChannel1.WriteInbound(Unpooled.WrappedBuffer(message.ToByteArray()));
return _embeddedChannel1.ReadInbound();
}
```
This case is not working. Decode method is not called. I mean when I call Decode, the Decode in DimensionStoryDecoder is not called.
```
private EmbeddedChannel _embeddedChannel1 = new EmbeddedChannel(new DimensionStoryDecoder());
public object Decode(ByteString message)
{
_embeddedChannel1.WriteInbound(Unpooled.WrappedBuffer(message.ToByteArray()));
return _embeddedChannel1.ReadInbound();
}
```
This case is working. Decode method is called.
Contributor guide
Assessment
This issue has not been assessed yet.