package cn.reghao.devops.web.mgr.machine.util;

import org.springframework.web.socket.WebSocketSession;

import java.io.IOException;

/**
 * @author reghao
 * @date 2021-07-07 13:19:42
 */
public interface WebSsh {
    void init(WebSocketSession session);
    /**
     * 处理客户端发送的消息
     *
     * @param
     * @return
     * @date 2021-07-07 下午4:45
     */
    void handleMessage(String buffer, WebSocketSession session);
    /**
     * 返回消息给客户端
     *
     * @param
     * @return
     * @date 2021-07-07 下午4:45
     */
    void sendBack(WebSocketSession session, byte[] buffer) throws IOException;
    void close(WebSocketSession session);
}
