⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tcpclient.java

📁 同步接收web services请求
💻 JAVA
字号:
package com.aceway.vas.commons.tcp;

import java.io.Serializable;

public interface TcpClient {

   //  首先调用这个方法, 然后调用public boolean connect(String ip, int port)
    void setDataHandler(IClientHandler handler, int maxPacketSize);

    // 连接服务器端口
    // obj必须是继承IClientHandler接口的
    public boolean connect(String ip, int port);

    // 向服务器发送消息
    public int send(byte[] bytes);

    //不需要切片
    public int send(Serializable obj);

    // 关闭和服务器的连接
    public boolean disconnect();



}

⌨️ 快捷键说明

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