package com.cm.socket.service;

import com.cm.socket.pojo.Message;
import io.netty.channel.ChannelHandlerContext;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: ISocketServer
 * @Description: Socket业务接口
 * @Author: WangGeng
 * @Date: 2020/7/28 2:41 下午
 * @Version: 1.0
 **/
public interface ISocketService {

    /**
     * 读取数据
     *
     * @param channelHandlerContext
     * @param readMessage
     */
    void readMessage(ChannelHandlerContext channelHandlerContext, Message readMessage) throws Exception;

    /**
     * 自动回复数据
     *
     * @param channelHandlerContext
     */
    void autoReply(ChannelHandlerContext channelHandlerContext) throws Exception;

}
