1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package com.dy.common.mw.channel.tcp;
 
import org.apache.mina.core.session.IoSession;
 
public interface TcpIoSessionEventCallback {
    
    /**
     * 网络打开
     */
    void sessionOpened(IoSession session) throws Exception  ;
    /**
     * 网络关闭
     */
    void sessionClosed(IoSession session) throws Exception  ;
    
    /**
     * 发生异常
     */
    void exceptionCaught(IoSession session, Throwable cause) throws Exception ;
    
    
    /**
     * 发送数据后,回调的方法,进行数据处理
     */
    void messageSended(IoSession session, Object message) throws Exception  ;
    
    /**
     * 接收到数据后,回调的方法,进行数据处理
     */
    void messageReceived(IoSession session, Object message) throws Exception  ;
    
}