package com.yeejoin.amos.iec104.tcp.server.connector;


import io.netty.channel.ChannelHandlerContext;

public class TcpConnector {
	private ChannelHandlerContext ctx;

	public TcpConnector(ChannelHandlerContext ctx) {
		this.ctx = ctx;
	}
	
	/**
	 * 	发送数据 ----待开发
	 * @param apdu
	 */
	public void sendMessage(String strBytes) {
		ctx.channel().writeAndFlush(strBytes, ctx.newPromise());
	}

	public void closeConnect() {
		this.ctx.close();
	}

	public ChannelHandlerContext getCtx() {
		return ctx;
	}

	public void setCtx(ChannelHandlerContext ctx) {
		this.ctx = ctx;
	}

	
}
