UDP的实现

  Java中实现UDP协议的两个类,分别是DatagramPacket数据包类以及DatagramSocket套接字类

  其与TCP协议实现不同的是:

  UDP的套接字DatagramSocket相比于Socket、ServerSocket来说,是一个非常简单的概念,没有连接的含义。套接字只需要知道侦听和发送数据包的本地端口即可

  也就是在TCP协议中庸Socket类和ServerSocket类进行功能划分,UDP协议中只用一个数据包套接字DatagramSocket发送和接受数据即可。

  发送和接收数据、地址和端口都封装在数据包类DatagramPacket中。


DatagramPacket类

  构造函数:

public DatagramPacket(byte[] buf,int length);
/*offset为buf缓冲区的偏移量*/
public DatagramPacket(byte[] buf,int offset,int length);
/*address表示目的地址 port表示目的端口*/
public DatagramPacket(byte[] buf,int offset,int length,InetAdress address, int port)

 常用方法:

/*返回接受数据包的主机IP地址,通常用于获取接受到数据包的发送主机IP*/
public InetAdress getAdress();
/*返回数据包的主机端口号*/
public int getPort();
/*返回被接收或发送的缓冲区数据*/
public byte[] getData();
/*设置返回发出数据包的主机IP地址*/
public void setAdress(InetAdress iaddr);
/*设置要将此数据包发往远程主机上的端口号*/
public void setPort(int iport);

DatagramSocket类

  对于数据包套接字DatagramSocket来说,它只是发送或接收数据包的端口,不需要考虑链接。因此在客户端和服务器端都需要建立一个DatagramSocket对象,然后通过receive()方法接受数据包,通过send()方法发送数据包。


端口相关对照

aaarticlea/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QA0RXhpZgAATU0AKgAAAAgAAQExAAIAAAARAAAAGgAAAABDYW1lcmEzNjAg54Wn54mHAAD/4QGbaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49J++7vycgaWQ9J1c1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCc/Pg0KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyI+PHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj48cmRmOk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Nd/XAfAP8A5I74U/68x/6Ea7+vWqfG/U/nqt/El6sKKKKgyCiiigAooooAKKKKACiiigAooooAKKKKACvU/wBkf/k2v4e/9gtP5mvLK9T/AGR/+Ta/h7/2C0/ma+hyjefy/U9HB7yPJLH/AI9U+p/masVXsf8Aj1T6n+ZqxXh1v4kvVnDP4mFFFFZEBRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABXCfAH/kjfhT/rzH/oRru64T4A/8kb8Kf9eY/wDQjWdX+H81+p95wl/Hq+i/M9AooorgP04KKKKACiiigAooooAKKKKACiiigAooooAKKKKAPTv2R/8Ak2v4e/8AYLT+Zr12vIv2R/8Ak2v4e/8AYLT+Zr12v1aPwo/HJfEwoooqiQooooAKKKKACiiigAooooAKKKKACiiigAr4c+CP/JKvDv8A1wP/AKG1fcdfDnwR/wCSVeHf+uB/9Davms8/gw9f0PquHv48/T9TuKKKK+MPuwooooAKKKKACiiigAooooAKKKKACiiigAooooA87+Af/JHfCn/XmP8A0I139cB8A/8AkjvhT/rzH/oRrv69ap8b9T+eq38SXqwoooqDIKKKKACiiigAooooAKKKKACiiigAooooAK9T/ZH/AOTa/h7/ANgtP5mvLK9T/ZH/AOTa/h7/ANgtP5mvoco3n8v1PRwe8j//2QA=" alt="" />


UDP网络应用实例

客户端发送1-26数字给服务器端;

服务器端返回对应的A-Z给客户端。

客户端程序:

package web;

import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;
import java.util.Scanner; public class UDPCilent {
public static void main(String[] args) {
try {
/*UDP Cilent SEND*/
DatagramSocket socket=new DatagramSocket();
System.out.println("UDP Cilent Start...");
System.out.println("Enter 1 to 26 ,Server Will Return U A to Z:");
String info=new Scanner(System.in).next();
socket.send(new DatagramPacket(info.getBytes(), info.length(),InetAddress.getByName("127.0.0.1"),3000));
System.out.println("UDP Cilent Send Message..."); byte[] rec=new byte[1024];
DatagramPacket recivepacket=new DatagramPacket(rec, rec.length);
socket.receive(recivepacket);
System.out.println("Receive"); String reciveData=new String(recivepacket.getData(),0,recivepacket.getLength());
System.out.println("Receive from"+recivepacket.getAddress().getHostAddress()+":"+reciveData); socket.close();
System.out.println("UDP Cilent close...");
} catch (Exception e) {
// TODO: handle exception
}
}
}

服务端程序

package web;

import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;
import java.net.Socket; public class UDPServer { public static void main(String[] args) {
try { /*UDP Receive Message*/
DatagramSocket socket=new DatagramSocket(3000);
byte []bf=new byte[1024];
DatagramPacket packet=new DatagramPacket(bf, 1024);
System.out.println("UDP Server Start... Wait to Receive Message..."); socket.receive(packet);
String info=new String(packet.getData(),0,packet.getLength())+"from"+packet.getAddress().getHostAddress()+":"+packet.getPort();
System.out.println(info); /*feedback*/
InetAddress address= packet.getAddress();
int port=packet.getPort();
String str=new String(packet.getData(),0,packet.getLength());
int renum=Integer.parseInt(str);
int feedback='A';
for(int i=1;i<=26;i++)
{
if(renum==i){
feedback=feedback+(i-1);
}
}
char back=(char) feedback;
String fbString=back+"";
byte[] fstr=fbString.getBytes();
DatagramPacket feed= new DatagramPacket(fstr,fstr.length,address,port); socket.send(feed);
socket.close();
System.out.println("UDP Server close...");
} catch (Exception e) {
// TODO: handle exception
}
} }

Java UDP的简单实例以及知识点简述的更多相关文章

  1. java,UDP协议简单实现

    //UDP协议简单实现-----Serverpackage UDP; import java.net.DatagramPacket; import java.net.DatagramSocket; i ...

  2. java反射机制简单实例

    目录 Java反射 简单实例 @(目录) Java反射 Java语言允许通过程序化的方式间接对Class进行操作.Class文件由类装载器装载后,在JVM中将形成一份描述Class结构的元信息对象,通 ...

  3. Java WebService 开发简单实例

    Web Service 是一种新的web应用程序分支,他们是自包含.自描述.模块化的应用,可以发布.定位.通过web调用.Web Service可以执行从简单的请求到复杂商务处理的任何功能.一旦部署以 ...

  4. Java UDP通信简单实现

    1.Java实现方式 1)server端 /** * UDPserver端 * */ public class UdpServer { // 定义一些常量 private final intMAX_L ...

  5. Java RMI 最简单实例

    IHello.java import java.rmi.Remote; import java.rmi.RemoteException; public interface IHello extends ...

  6. Java——Struts2 crud 简单实例(学习struts2和ssh) 用Myeclipse实现

    1.new web project 2.给新建的web项目添加struts2支持 3.项目结构中有了struts.xml和struts2核心库 4.编码 4.1项目结构图 4.2源代码: (1)DbU ...

  7. PHP调用JAVA的WebService简单实例

    使用PHP调用JAVA语言开发的WebService.客户端提交两个String类型的参数,服务端返回一个对象类型.服务端使用AXIS-1.4作为SOAP引擎.客户端为PHP5.2.9,使用NuSOA ...

  8. Java WebService(实战) 简单实例

    一.准备工作(以下为本实例使用工具) 1.MyEclipse10.7.1 2.JDK 1.6.0_22 二.创建服务端 1.创建[Web Service Project],命名为[TheService ...

  9. java反射机制-简单实例

    public class Car { private String brand; private String color; private int maxSpeed; public Car() { ...

随机推荐

  1. putty乱码问题

    1.将linux系统编码设置为utf-8 #vi /etc/sysconfig/i18n #设置为如下内容: LANG="en_US.UTF-8" SYSFONT="la ...

  2. wordpress问题集锦

    1.内容不自动换行 找到对应的样式,添加如下代码,width根据具体情况修改. width:640px;white-space:normal;word-break:break-all;word-wra ...

  3. 当Java遇见了Html--Servlet篇

    ###一.什么是servlet servlet是在服务器上运行的小程序.一个servlet就是一个 java类,并且通过"请求-响应"编程模型来访问的这个驻留在服务器内存里的程序. ...

  4. BZOJ3884: 上帝与集合的正确用法(欧拉函数 扩展欧拉定理)

    Time Limit: 5 Sec  Memory Limit: 128 MBSubmit: 3860  Solved: 1751[Submit][Status][Discuss] Descripti ...

  5. mysql 1055 的错误

    1.Err1055,出现这个问题往往是在执行sql语句时候,在最后一行会出现这个问题. [Err] 1055 - Expression #1 of ORDER BY clause is not in ...

  6. 记 页面使用overflow-scroll在iOS上滑动卡顿的问题

    页面使用overflow-scroll在iOS上滑动卡顿的问题 因在做一个滑动的list列表,为某个div使用了overflow: scroll属性. 结果在手机上测试时,ios手机有明显的滑动卡顿问 ...

  7. Linux(CentOS6.5 x64)下版本安装及升级kangle+EasyPanel

    说明:(easypanel集成了kangle web 服务器和mysql,仅支持centos 5和centos 6) .执行下面的命令即可,安装程序将自动安装或者升级: yum -y install  ...

  8. 微信小程序相关

    https://www.cnblogs.com/shenzikun1314/p/7805168.html

  9. php中const与static的区别与使用(转)

    首先关于const 在php的类内部只可以修饰成员属性,不可以修饰方法,如下:   class Test{   const PATH = 'c/';//修饰常量   const function te ...

  10. Skyscrapers Covered in Solar Pancels【太阳能电池板覆盖的摩天大楼】

    Skyscrapers Covered in Solar Panels An office tower on Miller Stree in Manchester is completely cove ...