From e7b8a808c2274e9c4329092bb752c7ea5cb035fc Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期一, 13 十二月 2021 14:20:20 +0800 Subject: [PATCH] 2021-12-13 1.优化发送,和认证失败错误码处理 --- HDLSDK/hdl-socket/src/main/java/com/hdl/sdk/socket/client/IUdpClient.java | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 42 insertions(+), 0 deletions(-) diff --git a/HDLSDK/hdl-socket/src/main/java/com/hdl/sdk/socket/client/IUdpClient.java b/HDLSDK/hdl-socket/src/main/java/com/hdl/sdk/socket/client/IUdpClient.java new file mode 100644 index 0000000..0e6e5d6 --- /dev/null +++ b/HDLSDK/hdl-socket/src/main/java/com/hdl/sdk/socket/client/IUdpClient.java @@ -0,0 +1,42 @@ +package com.hdl.sdk.socket.client; + +import com.hdl.sdk.socket.SocketOptions; +import com.hdl.sdk.socket.udp.UdpSocketOptions; + +import java.net.InetSocketAddress; +import java.net.SocketAddress; + +/** + * Created by hxb on 2021/12/12. + */ +public interface IUdpClient { + + /** + * 缁戝畾绔彛 + */ + void bind() throws Exception; + + /** + * 鍏抽棴褰撳墠杩炴帴 + * @return + */ + boolean close(); + + + UdpSocketOptions getOptions(); + + /** + * 鐩戝惉鏁版嵁 + */ + void onHandleResponse() throws Exception; + + /** + * 鍙戦�佹暟鎹� + * @param ipAddress 鐩爣IP + * @param port 绔彛 + * @param msg 鍙戦�佹暟鎹� + * @throws Exception + */ + void sendMsg(String ipAddress,int port, byte[] msg) throws Exception; + +} -- Gitblit v1.8.0