package com.hmsoft.remote.rmi.rpc;

import com.hmsoft.remote.rmi.exception.RemotingException;
import com.hmsoft.remote.rmi.transport.NettyChannel;

/**
 * 
 * Client
 *
 */
public interface Client {

    /**
     * send message.
     *
     * @param message
     * @throws RemotingException
     */
    void send(Object message) throws RemotingException;

    /**
     * send message.
     *
     * @param message
     * @param sent    already sent to socket?
     */
    void send(Object message, boolean sent) throws RemotingException;
    
    /**
     * 获取通道.
     * @return
     */
    NettyChannel getChannel();
}
