Welcome![Sign In][Sign Up]
Location:
Search - DatagramSocket

Search list

[JSP/JavaJavaNetTest

Description: 3 pairs of sample codes for basic net apps: . Socket server/client . start the server first . DatagramSocket . start MyDatagramSocketA first . MyDatagramSocketA receive a packet first, and then send a reply MyDatagramSocketA send a packet first, and then receive a reply. . Multicast sender/receiver . start the receiver first- 3 pairs of sample codes for basic net apps: . Socket server/client . start the server first . DatagramSocket . start MyDatagramSocketA first . MyDatagramSocketA receive a packet first, and then send a reply MyDatagramSocketA send a packet first, and then receive a reply. . Multicast sender/receiver . start the receiver first
Platform: | Size: 4953 | Author: 宗睿 | Hits:

[Otherwssf

Description: JICQ是用JAVA语言编写的一个基于客户机/服务器(C/S)模式的局域短信实时通信工具系统,系统采用了Microsoft公司的SQL Server 2000作为后台数据库,系统通过JDBC访问数据库。系统分为服务器程序和客户程序两部分,服务器与客户间采用“传输控制协议”(TCP),通过套接字(Socket)连接,客户之间采用“用户数据报协议”(UDP),通过数据报套接字(DatagramSocket)建立连接。系统具有用户注册、用户登录、添加好友、删除好友、发送和接收消息等功能。-JICQ Java is a language based on the client / server (C / S) mode Local SMS real-time communications tool, the system uses Microsoft's SQL Server 2000 database as a background, system access to the database through JDBC. System is divided into server and two clients, the server-client "Transmission Control Protocol" (TCP), socket (Socket) connectivity, customers using the "User Datagram Protocol" (UDP), through Datagram Sockets (DatagramSocket) establish a connection. Users registered with the system, users log in, friends add, delete friends, send and receive news and other functions.
Platform: | Size: 54733 | Author: 乔峰 | Hits:

[Otherzzcx

Description: The JICQ is the bureau area which JAVA writes according to \"Customer s Machine/Server\"(C/S) mode message solid hour correspond by letter tool system, the system adopted the SQL Server2000 of Microsoft company as a backstage database, the system passes a JDBC interview database. The system is divided into the server procedure and customer s procedure two parts, server and customer adoption \"Transmission Control Protocol\"(TCP), connect a word (Socket) conjunction through a set, the adoption \"User Datagram Protocol \"(UDP) of the customer s, pass a data report a set to connect a word (DatagramSocket) establishment a conjunction. The system has customer registration, customer to register, increase good friend, delete good friend and send out and receive news etc. function.-JICQ The bureau is the area which write Java s according to the "Customer s Machine / Server" (C / S) mode message solid hour correspond by letter tool system. the system adopted the SQL Server2000 of Micros oft company as a backstage database, the system passes a database JDBC interview. Th e system is divided into the server procedure an d customer s procedure two parts. server and customer adoption "Transmission Co. ntrol Protocol "(TCP), connect a word (Socket) through a conjunction s et. the adoption "User Datagram Protocol" (UDP) of the customer s, pass a data report a set to connect a word (Datagr amSocket) establishment a conjunction. The sy stem has customer registration, customer to register, increase good friend, delete good friend and send out and
Platform: | Size: 17802 | Author: 乔峰 | Hits:

[Communicationsend_receive_message

Description: 2个主机互相发送和接收数据,用DatagramSocket类另一个构造方法DatagramSocket(int port)创建一个对象。
Platform: | Size: 2424 | Author: 朱振强 | Hits:

[ICQ-IM-ChatChat

Description: 基于UDP通讯的聊天室,使用DatagramSocket DatagraPachet,实现聊天功能,多线程操作
Platform: | Size: 1362 | Author: May | Hits:

[JSP/JavaJAVAICQ

Description: 客户通过Socket(InetAddress,port)建立与服务器的连接。服务器与客户都通过构造BufferedReader,PrintWriter来建立输入输出流,然后双方通过该输入输出流来相互传递信息,一旦收到客户方的连接请求,服务器accept()方法返回一个新建的Socket对象。客户端然后向服务器发送消息,比如注册,登录,查找好友等,服务器收到来自客户的请求后,针对不同的消息处理请求, 虽然UDP不可靠但是对于icq可靠性并不太重要,而且UDP快速,所以客户间发送信息通过UDP。用户登录时通过类DatagramPacket和DatagramSocket创建UDP包括其本地接受端口以及发送端口,默认端口为5000和5001,通过取得的好友的IP地址来向好友发送消息(send(DatagramPacket)和接受消息(receive(DatagramPacket))。当用户通过UDP收到消息后,可以通过DatagramPacket的方法InetAddress getAddress()得到对方的ip地址,通过对好友列表比较以判断是谁并提示用户收到某某的消息,然后用户选择该用户查看消息,如果好友列表没有该人就显示收到陌生人的消息。用户可以按陌生人按钮查看消息。
Platform: | Size: 103762 | Author: 里严明 | Hits:

[JSP/JavaJava聊天室程序

Description: 这个是服务器 import java.awt.*; import java.awt.event.*; import java.net.*; import javax.swing.*; public class UDPServerDemo extends JFrame{ int port=2345; //端口号 public UDPServerDemo(){ try{ byte[] buffer=new byte[256]; //缓冲区数组 DatagramSocket socket=new DatagramSocket(port); //实例化数据报Socket DatagramPacket packet; System.out.println("Server start..."); //输出运行信息 while (true){ packet=new DatagramPacket(buffer,buffer.length); //实例化数据报 socket.receive(packet); //接受请求 InetAddress target=packet.getAddress(); System.out.println("Received from"+target); //输出请求地址 int port=packet.getPort(); //得到接收端口 byte[] message="This is server,Who are you?".getBytes(); //服务器返回信息 packet=new DatagramPacket(message,message.length,target,port); //实例化数据报 socket.send(packet); //发送数据报 } } catch (Exception ex){ ex.printStackTrace(); //输出出错信息 } } public static void main(String[] args){ new UDPServerDemo(); } }
Platform: | Size: 1095119 | Author: 594353482@qq.com | Hits:

[JSP/JavaJavaNetTest

Description: 3 pairs of sample codes for basic net apps: . Socket server/client . start the server first . DatagramSocket . start MyDatagramSocketA first . MyDatagramSocketA receive a packet first, and then send a reply MyDatagramSocketA send a packet first, and then receive a reply. . Multicast sender/receiver . start the receiver first- 3 pairs of sample codes for basic net apps: . Socket server/client . start the server first . DatagramSocket . start MyDatagramSocketA first . MyDatagramSocketA receive a packet first, and then send a reply MyDatagramSocketA send a packet first, and then receive a reply. . Multicast sender/receiver . start the receiver first
Platform: | Size: 5120 | Author: 宗睿 | Hits:

[Otherwssf

Description: JICQ是用JAVA语言编写的一个基于客户机/服务器(C/S)模式的局域短信实时通信工具系统,系统采用了Microsoft公司的SQL Server 2000作为后台数据库,系统通过JDBC访问数据库。系统分为服务器程序和客户程序两部分,服务器与客户间采用“传输控制协议”(TCP),通过套接字(Socket)连接,客户之间采用“用户数据报协议”(UDP),通过数据报套接字(DatagramSocket)建立连接。系统具有用户注册、用户登录、添加好友、删除好友、发送和接收消息等功能。-JICQ Java is a language based on the client/server (C/S) mode Local SMS real-time communications tool, the system uses Microsoft's SQL Server 2000 database as a background, system access to the database through JDBC. System is divided into server and two clients, the server-client "Transmission Control Protocol" (TCP), socket (Socket) connectivity, customers using the "User Datagram Protocol" (UDP), through Datagram Sockets (DatagramSocket) establish a connection. Users registered with the system, users log in, friends add, delete friends, send and receive news and other functions.
Platform: | Size: 54272 | Author: 乔峰 | Hits:

[Otherzzcx

Description: The JICQ is the bureau area which JAVA writes according to "Customer s Machine/Server"(C/S) mode message solid hour correspond by letter tool system, the system adopted the SQL Server2000 of Microsoft company as a backstage database, the system passes a JDBC interview database. The system is divided into the server procedure and customer s procedure two parts, server and customer adoption "Transmission Control Protocol"(TCP), connect a word (Socket) conjunction through a set, the adoption "User Datagram Protocol "(UDP) of the customer s, pass a data report a set to connect a word (DatagramSocket) establishment a conjunction. The system has customer registration, customer to register, increase good friend, delete good friend and send out and receive news etc. function.-JICQ The bureau is the area which write Java s according to the "Customer s Machine/Server" (C/S) mode message solid hour correspond by letter tool system. the system adopted the SQL Server2000 of Micros oft company as a backstage database, the system passes a database JDBC interview. Th e system is divided into the server procedure an d customer s procedure two parts. server and customer adoption "Transmission Co. ntrol Protocol "(TCP), connect a word (Socket) through a conjunction s et. the adoption "User Datagram Protocol" (UDP) of the customer s, pass a data report a set to connect a word (Datagr amSocket) establishment a conjunction. The sy stem has customer registration, customer to register, increase good friend, delete good friend and send out and
Platform: | Size: 17408 | Author: 乔峰 | Hits:

[Communicationsend_receive_message

Description: 2个主机互相发送和接收数据,用DatagramSocket类另一个构造方法DatagramSocket(int port)创建一个对象。-2 host each other to send and receive data, use another constructor DatagramSocket Class DatagramSocket (int port) to create an object.
Platform: | Size: 2048 | Author: 朱振强 | Hits:

[ICQ-IM-ChatChat

Description: 基于UDP通讯的聊天室,使用DatagramSocket DatagraPachet,实现聊天功能,多线程操作-UDP-based communications, chat rooms, use the DatagramSocket DatagraPachet, realize chat, multi-threaded operation
Platform: | Size: 1024 | Author: May | Hits:

[JSP/JavaJAVAICQ

Description: 客户通过Socket(InetAddress,port)建立与服务器的连接。服务器与客户都通过构造BufferedReader,PrintWriter来建立输入输出流,然后双方通过该输入输出流来相互传递信息,一旦收到客户方的连接请求,服务器accept()方法返回一个新建的Socket对象。客户端然后向服务器发送消息,比如注册,登录,查找好友等,服务器收到来自客户的请求后,针对不同的消息处理请求, 虽然UDP不可靠但是对于icq可靠性并不太重要,而且UDP快速,所以客户间发送信息通过UDP。用户登录时通过类DatagramPacket和DatagramSocket创建UDP包括其本地接受端口以及发送端口,默认端口为5000和5001,通过取得的好友的IP地址来向好友发送消息(send(DatagramPacket)和接受消息(receive(DatagramPacket))。当用户通过UDP收到消息后,可以通过DatagramPacket的方法InetAddress getAddress()得到对方的ip地址,通过对好友列表比较以判断是谁并提示用户收到某某的消息,然后用户选择该用户查看消息,如果好友列表没有该人就显示收到陌生人的消息。用户可以按陌生人按钮查看消息。 -err
Platform: | Size: 103424 | Author: 里严明 | Hits:

[Windows Developliaotainshixianchenxu156

Description: Java聊天室小程序-服务器代码实现方面-import java.io.IOException import java.net.DatagramPacket import java.net.DatagramSocket import java.net.InetAddress import java.net.SocketAddress import java.net.SocketException import java.net.UnknownHostException import java.util.Enumeration import java.util.Hashtable import java.util.Scanner public class Server implements
Platform: | Size: 4096 | Author: 翟艳斌 | Hits:

[CommunicationSyncTime

Description: 从网络服务器同步系统时间,采用UDP协议,使用DatagramPacket,DatagramSocket类-From the network server time synchronization system, using UDP protocol, use the DatagramPacket, DatagramSocket Class
Platform: | Size: 1024 | Author: leo | Hits:

[Game Programdemo1

Description: 中国象棋 /源文件保存为 demo1.java 编译运行, //注:端口号文本框只是为了在单机上调试用的, //若在网络中运行,直接将代码中的 //DatagramSocket sock = new DatagramSocket(mypt) 改为: DatagramSocket sock = new DatagramSocket(2000) //取默认端口: 2000 然后只需要输入对方的IP地址即可玩网络象棋了。 //玩法:鼠标点击拖动棋子,程序中不对走法的正确性进行校验!完全凭自觉性。 -China Chess
Platform: | Size: 2048 | Author: tom | Hits:

[Internet-NetworkDatagramSocket

Description: 在DatagramSocket 上总是启用UDP 广播发送。为了接收广播包,应该将DatagramSocket 绑定到通配符地址。在某些实现中,将DatagramSocket 绑定到一个更加具体的地址时 ... -The DatagramSocket on UDP broadcasts sends are always enabled. In order to receive broadcast packets DatagramSocket should be bound to the wildcard address. In some implementations, the DatagramSocket bound to a more specific address ...
Platform: | Size: 1024 | Author: chenggil102 | Hits:

[JSP/JavaClient_Server

Description: 编写客户/服务器程序,客户端Client.java使用DatagramSocket对象将数据包发送到服务器,请求获取服务器端的图像(考生可自选图像文件)。服务器端Server.java将图像文件包装成数据包,并使用DatagramSocket对象将该数据包发送到客户端。首先将服务器端的程序编译通过,并运行起来,等待客户的请求。-The preparation of client/server program, client Client.java use DatagramSocket object data packets sent to the server, requesting access to server-side image (Candidates may be optional graphics file). Server-side image file Server.java will be packaged into data packets, and use the DatagramSocket object to send the packet to the client. First, the procedure will be compiled by the server-side and up and running, waiting for client requests.
Platform: | Size: 2048 | Author: Allan | Hits:

[J2MEj2me-net

Description: Test1---http连接 Test2---Socket连接 Test3---DatagramSocket连接 Test4---MMAPI Test5---多客户端服务器 Test6---MMAPI2 Test7---WMAServer-jave net
Platform: | Size: 9784320 | Author: bateer | Hits:

[JSP/Javaudp-reliable-data-transmission

Description: UDP实现可靠数据传输。使用GBN算法,实现了:1.随即丢包(随机数产生器Math.random()) 2.丢包后遇冗余ack重传 3.超时重传 (DatagramSocket和Socket都有成员函数setSoTimeout(delay),通过捕获超时时抛出的IO异常来实现超时重传)-Reliable UDP data transfer. GBN algorithm used to realize: 1. Then packet loss (random number generator Math.random ()) 2. After the case of redundant packet loss retransmission ack 3. Retransmission timeout (DatagramSocket and Socket has a member function setSoTimeout ( delay), by capturing the IO exception thrown during timeout to achieve retransmission timeout)
Platform: | Size: 10240 | Author: nazali | Hits:
« 12 »

CodeBus www.codebus.net