private void performSend(byte[] raw) throws IOException
{
if (this.outBuf != null)
{
this.outBuf.write(raw);
raw = this.outBuf.toByteArray();
this.outBuf = null;
}
//char[] encoded = Base64.encode(raw);
if (this.binary)
{
this.ctx.channel().write(new BinaryWebSocketFrame(Unpooled.wrappedBuffer(raw)));
}
else
{
this.ctx.channel().write(new TextWebSocketFrame(StringUtil.toUtfString(raw)));
}
}
WebSocketTransport.java 文件源码
java
阅读 37
收藏 0
点赞 0
评论 0
项目:trap
作者:
评论列表
文章目录