feat: channel add ext data

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
2020-02-27 18:14:17 +08:00
parent 0b416adfd2
commit e7d44af48c
5 changed files with 40 additions and 41 deletions

View File

@ -25,7 +25,7 @@ export class SpongeChannel extends channel.Channel {
}
let innerListener = new RawDataListener({
handlePayload: (/* ChannelBuf */ data: any, /**RemoteConnection */ connection: any, /**Platform.Type */ side: any) => {
listener(data.readBytes(data.available()))
listener(data.readBytes(data.available()), { data, connection, side })
}
})
this.channelMap.get(channel).addListener(innerListener);