packet.java

来自「银行项目为后台socket通信写的程序」· Java 代码 · 共 37 行

JAVA
37
字号
/****************************************************************************
 * Package		: com.ecSolutions.ecAppServer.server
 * File			: Packet.java
 * Create Date  : 2007-7-20
 * Author		: Steven Chen
 * 
 * Copyright(C) 2006 ecSolutions(shanghai) Co.,Limited.All Rights Reserved.
 *			
 ***************************************************************************/
package com.ecSolutions.ecAppServer.server;

import java.net.SocketAddress;

/**
 * Packet contains content and address.
 * 
 * @author Steven Chen
 * @version $Id: Packet.java,v 1.2 2007/07/26 04:10:42 stevenchen Exp $
 */
public interface Packet {

    /**
     * Get the socket address of the packet.
     * 
     * @return the socket address
     */
    SocketAddress getAddress();

    /**
     * Get the content of the packet.
     * 
     * @return content
     */
    Buffer getContent();

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?