package com.snowcattle.game.service.net.session; import com.snowcattle.game.service.net.message.AbstractNetMessage; import io.netty.channel.Channel; /** * Created by jwp on 2017/2/16. * nettyçš„udp session */ public class NettyUdpSession extends NettySession{ private NettyUdpNetMessageSender nettyUdpNetMessageSender; public NettyUdpSession(Channel channel) { super(channel); this.nettyUdpNetMessageSender = new NettyUdpNetMessageSender(this); } public void write(AbstractNetMessage msg) throws Exception { if (msg != null) { channel.writeAndFlush(msg).sync(); } } }