Sending bytes in flash target problem

hi,
so I made socket connection, as always all is working in neko, but in flash when i try to send bytes:

var msg = {action:"new_game", type:"multiplayer"};
    this._socket.writeBytes(cast MsgPack.encode(msg));
    this._socket.flush();

it do nothing in flash.
i try to put trace before and after this lines, and line after writeBytes never executed.
also server never get the message.
so how to send bytes in flash?

Could you check what MsgPack.encode is returning to you? Is it null? If not, what is the .length? Does it help to set .position = 0; on the return value?

If MsgPack.encode returns haxe.io.Bytes instead of openfl.utils.ByteArray, you may need to do ByteArray.fromBytes () on the return value