DotNetty
DotNetty copied to clipboard
Cant send 2 Ibytebuffers to channel.writeasnycflush(message)
So i try to call this on the server back to back for example
senpacket(buf1) sendpacket(buf2)
when i throw a break-point in debug mode on sendpacket2 it gets sent and I receive it on the client end but without the breakpoint, I never receive the second packet at all. Client only ever reads 1 opcode to handle when there is no break-point...
any ideas on what the issue can be? I'm not sure what kind of code ot paste for reference
public void SendPacket(IOutGoingPackets packet)
{
var buffer = Unpooled.Buffer();
buffer.WriteInt((int)packet.PacketType);
buffer.WriteBytes(packet.GetPacket().Array);
WriteToChannel(buffer);
}
private void WriteToChannel(IByteBuffer data)
{
_channel.WriteAndFlushAsync(data);
}
I've tried to make the functions tasks and wait for each but it did nothing