项目作者: AdrianHsu

项目描述 :
簡易實作 Java TCP, UDP 的客戶端與服務端(計算機網路)
高级语言: Java
项目地址: git://github.com/AdrianHsu/java-tcp-udp.git
创建时间: 2018-03-05T17:17:41Z
项目社区:https://github.com/AdrianHsu/java-tcp-udp

开源协议:

下载


Java TCP / UDP 實作

1. [Socket Programming - TCP]

With a TCP Server provided to you, we’re going to construct a client to communicate with it. Fig. 1:1 describes the messages sent between client and server.

img1

This code can 1) read the message sent from server and 2) send the user:input message to the server. There will be 5 messages from server and 4 messages sent to the server alternatively like Fig 1:1.

2. [Socket Programming - UDP]

In this experiment, we consider a UDP server and a UDP client. If the client sends 10000 packets back to back to the server (i.e. continually send 10000 packets), we discuss about how many packets will the server receive, and how many of them are lost.