国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看

合肥生活安徽新聞合肥交通合肥房產生活服務合肥教育合肥招聘合肥旅游文化藝術合肥美食合肥地圖合肥社保合肥醫院企業服務合肥法律

代寫UDP Client-Server application java程序

時間:2024-02-21  來源:合肥網hfw.cc  作者:hfw.cc 我要糾錯




Programming Assignment 1

Objective of this assignment:

.     Develop and implement a simple application using UDP sockets. The client must be implemented in Java. The server can be implemented in Java or in your preferred 1 language (different from Java) for a 5 points bonus. Insure that your preferred language is already installed and available on Tux machines. It is your responsibility to check ahead: do not check/test at the last minute.

What you need to do:

1.   Implement a simple UDP Client-Server application

Objective:

The objective is to implement a simple client-server application using a safe method: start from working code for the client and the server. You must slowly and carefully bend (modify) little by little the client and server alternatively until you achieve your ultimate goal: meeting all requirements for this assignment. You must bend and expand each piece alternatively the way a black-smith forges iron. From time to time save your working client and server such that you can roll-back to the latest working code in case of bugs. Not using this "baby steps" strategy may leave you with a ball of wax hard to debug.

For this programming assignment, you are advised (optional, not mandatory) to start from the Friend client and server code (see lecture and resources) to implement this simple application. The Friend app was presented during the lectures. Consider using Wireshark to check whether the protocols you implement meet this assignment requirements. If using a language other than Java for the server, you are on your own. Ensure that your preferred language is already available on Tux machines. It is your responsibility to timely check. Start ahead. Do not wait until the last minute.

Hint: look at how to “ How to get started?” below

Part A: Datagram socket programming

The objective is to design a Calculating Server (CS). This calculating server performs bitwise  Boolean and arithmetic computations requested by a client on signed integers. Your server must offer the following operations:  1) addition (+), subtraction (-), 3) bitwise OR (|), 4) bitwise AND (&), 5) division (/), and 6) multiplication (*).

A client will form a request  following  this protocol (byte per byte):



TML

Op Code

Operand 1

Operand 2

Request ID

Op Name Length

Op Name

Size (bytes)

1

1

4

4

2

1

Variable

Where

1) TML is the Total Message Length (in bytes) including TML. It is an integer representing the total number of bytes in the request.

2) Op Code is a number specifying the desired operation following this table

Operation

*

/

|

&

-

+

OpCode

0

1

2

3

4

5

3) Operand  1 is a signed number making the first operand

4) Operand 2 is a signed number making the second operand

5) Request ID is the request ID. This number is generated by the client to differentiate requests. You may use a variable randomly initialized and incremented each time a request is generated.

6) Op  Name Length is the length in bytes of the operation name (see below what the Operation Name is).  Pay attention: the length is the number of bytes used to encode the string. Recall that some encoding schemes use two bytes per character.

7) Op   Name is   name   of   the   requested  operation:   "addition",   "subtraction",  "or",  "and",  "division",  and "multiplication". The Op Name string must be encoded using "UTF- 16BE".

Operands are sent in the network byte order (i.e., big endian).

Hint: create a class object Request like "Friend", but with the fields needed for a request ...

Below are two examples of requests. Bytes in the array are hexadecimal numbers.

Request 1: suppose the Client requests to perform the OR operation 240 | 4: (This is the 5th request) (240) 10  = 0xF0 and (4) 10  = 0x04. We omit the “0x” prefix for each byte expressed in hexadecimal.

11 02 00 00 00 F0 00 00 00 04 00 05 04 0**F 00 72

Request 2: suppose the Client requests to perform the operation 227 &  183  (if this is the  12th  request):

13 03 00 00 00 E3 00 00 00 B7 00 0C 06 0**1 0**E 0**4

The Server will respond with a message with this format:

Total Message Length (TML)

Result

Error Code

Request ID

one byte

4 byte

1 byte

2 byte

Where

1) TML is the Total  Message Length (in bytes) including TML. It is an integer representing the total numbers of bytes in the message.

2) Result is the result of the requested operation

3) Error Code is 0 if the request was valid, and 127 if the request was invalid (Message length not matching TML)  4) Request ID is the request ID. This number is the number that was sent as Request ID in the request sent by the

client. This will allow the client to match the results to the appropriate request.

In response to Request 1 (240 | 4) below

11 02 00 00 00 F0 00 00 00 04 00 05 04 0**F 00 72

the server will send back: (. We omit the “0x” prefix for each byte expressed in hexadecimal. )

08 00 00 00 F4 00 00 05

In response to Request 2 (227 &  183 ),

13 03 00 00 00 E3 00 00 00 B7 00 0C 06 0**1 0**E 0**4

the server would send back:

08 00 00 00 A3 00 00 0C

a) Repetitive Server: Write a datagram Calculating Server (ServerUDP.xxx). This server must respond to requests as described above. The server must bind to port (10010+TID) and could run on any  machine  accessible  on the  Internet. TID is  your  Canvas  team  #. The  server  must  accept  a command line of the form: prog ServerUDP portnumber where prog is the executable, portnumber is the port the server binds to. For example, if your Team ID (GID) is Team  13 then your server must bind to Port #  10023.

Whenever a server gets a request, it must:

i.   display the request one byte at a time in hexadecimal (for debugging and grading purpose)

ii.   display the request in a manner convenient for a typical Internet user: the request ID and the request (operands and required operation)

b)   Inplement a datagram client (ClientUDP.xxx)

i.   Accepts a command line of the form: prog ClientUDP servername PortNumber where prog is the executable, servername is the servername, and PortNumber is the port number of the server. Your program must prompt the user to ask for an Opcode, Operand1 and Operand2 where OpCode is the opcode of the requested operation (See the opcode table). Operand1 and Operand2 are the operands. For each entry from the user, your program must perform the following operations:

ii.   form a request as described above

iii.   display byte per byte in hexadecimal the request that will be sent

iv.   send the request to the server and wait for a response

v.   display the server’s response byte per byte in hexadecimal (for debugging and grading purpose)

vi.   display the  response of the server  in a manner convenient for a typical Internet user: the request ID, the response and the error code (display Ok when error code is 0)

vii.   display the roundtrip time (time between the transmission of the request and the reception of the response)

viii.   prompt the user for a new request. (Use some way to allow a client to quit. Just be explicit about how to quit)

To implement the server, you should consider (optional) starting with the Friend code. If you implement a successful server in a language different from Java, you will get 5 points Bonus points. For the language other than Java, the only constraint is that it must already be installed on Tux machines. Check the Tux machines for your chosen language before you start implementing.

Your code must be neat and pleasant to read. Comment the code appropriately. If starting from some  other  code, delete all   unnecessary   instructions (do not  just comment  out the   unnecessary instructions). A code not neat or pleasant will be penalized up to -30 points.

Data collection and analysis

For the client, report separately the min, average, and max round trip time. Include screenshots of your client and server executing on the Tux machines. Screenshots on machines other than the Tux machines will not receive any credit. To receive any credit, the screenshots must clearly show the Tux machine name, the username of one of the classmates, and the date. In other words, if any information (username, date, or tux machine name) is missing, the assigned credit for the assignment will be 0. You must have two screenshots: one for the server and one for the client. Here is a screenshot containing the Tux machine, a username, and a date. Avoid screenshots too small. If screenshots are not easily and conveniently readable, they will be considered missing. Screenshots must be easily and conveniently readable.



How to get started?

1) Download all files (UDP sockets) to run the "Friend" application used in Module 2 to illustrate how any class object can be exchanged: Friend.java, FriendBinConst.java, FriendEncoder.java, FriendEncoderBin.java, FriendDecoder.java, FriendDecoderBin.java, SendUDP.java, and RecvUDP.java.

2) Compile these files and execute the UDP server and client. Ensure they work.

3) Create a new folder called Request and duplicate inside it ALL files related to the Friend class object     4) Inside the Folder Request, change ALL occurrences of "Friend" with "Request" including the file names. 3) Adapt each file to your application. Replace the fields used by Friend with the fields used by a request.

4) Aim to have the client send one request and have the server understand it (just like what we did with a friend object).

5) When your server will receive and print out correctly a request, then you need to send back a response... 6) Create a class object Response....

Report (a missing report incurs a 30 points penalty)

.     Write a report that will report your results..

.     Your report must contain the following information:

o  whether the programs work or not (this must be just ONE sentence)

o  the directions to compile and execute your programs

o  the information this assignment asks you to report (minimum, average, and maximum round trip times) and the

required screenshots of the execution of the client and server. To receive any credit, the screenshots must clearly show the Tux machine, the username of one of the classmates, and the date. To get the date, just run the command date before executing your programs. Each missing or incomplete screenshot will result in a 50 points penalty.

What you need to turn in:

.      Electronic copy of your source programs (standalone, i.e. NOT in a zipped folder)

.      Electronic copy of the report (including your answers) (standalone, i.e. NOT in a zipped folder). Submit the file as a Microsoft Word or PDF file.

. In addition, put all files in a zipped folder and submit the zipped folder.

Grading

1) Client is worth 40% if it works well:

a) meets the protocol specifications (20%) and the user interface ( 10%)

b) communicates correctly with YOUR server (10%). Furthermore, screenshots of your client and server running on Tux machines must be provided. The absence of screenshots or Screenshots on machines other than the Tux machines will incur 50 points penalty per missing screenshot

2) UDP client is worth  10% if it works well with a working server from any of your classmates.

The server is graded the same as the client (30% +  10% +  10%).
請加QQ:99515681  郵箱:99515681@qq.com   WX:codehelp 

掃一掃在手機打開當前頁
  • 上一篇:代寫3D printer materials estimation編程
  • 下一篇:代寫 Behavioural Economics ECON3124
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    流體仿真外包多少錢_專業CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢_專業CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流體仿真服務 管路流場仿真外包
    CAE仿真分析代做公司 CFD流體仿真服務 管路
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真技術服務
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲勞振動
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲
    流體cfd仿真分析服務 7類仿真分析代做服務40個行業
    流體cfd仿真分析服務 7類仿真分析代做服務4
    超全面的拼多多電商運營技巧,多多開團助手,多多出評軟件徽y1698861
    超全面的拼多多電商運營技巧,多多開團助手
    CAE有限元仿真分析團隊,2026仿真代做咨詢服務平臺
    CAE有限元仿真分析團隊,2026仿真代做咨詢服
    釘釘簽到打卡位置修改神器,2026怎么修改定位在范圍內
    釘釘簽到打卡位置修改神器,2026怎么修改定
  • 短信驗證碼 寵物飼養 十大衛浴品牌排行 suno 豆包網頁版入口 wps 目錄網 排行網

    關于我們 | 打賞支持 | 廣告服務 | 聯系我們 | 網站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    亚洲一区不卡在线| 欧美激情亚洲另类| 成人乱人伦精品视频在线观看| 国产精品日韩一区二区三区| 亚洲精品日产aⅴ| 精品一区二区三区自拍图片区| 久久夜色精品亚洲噜噜国产mv| 欧美高清一区二区| 91精品国产99| 高清一区二区三区日本久| 久久99亚洲精品| 久久不射电影网| 欧美中在线观看| 国产精品久久久久av福利动漫| 国产精品一区二区三区在线观| 国产精品一区在线播放| 国产精品久久久久久久乖乖| 日本欧美黄网站| 91精品国产91久久久久久最新 | 国产www免费| 午夜dv内射一区二区| 国产伦精品一区二区三区照片91| 国产精品久久久久高潮| 欧美日韩国产综合在线| 久久www免费人成精品| 亚洲 中文字幕 日韩 无码| 黄色一级二级三级| 国产精品视频精品| 欧美极品少妇无套实战| 久久精品免费电影| 欧美又大粗又爽又黄大片视频| 久久久久久99| 日本一本草久p| 久久精精品视频| 日本三级韩国三级久久| 国产第一页视频| 日产精品久久久一区二区| 久久频这里精品99香蕉| 日韩av免费在线| 久久99欧美| 欧美性资源免费| 视频在线一区二区| 黄色一级视频在线播放| 国产精品大全| 国产欧美欧洲| 在线免费一区| 91国内在线视频| 日本一区免费看| 日韩亚洲国产中文字幕| 欧美二区在线视频| 精品久久久无码人妻字幂| 成人免费观看a| 亚洲国产成人不卡| 国产成年人在线观看| 欧美高清性xxxxhd| 欧美日韩爱爱视频| 97精品伊人久久久大香线蕉| 日韩最新中文字幕| 久久视频这里只有精品| 国产区亚洲区欧美区| 婷婷五月色综合| 国产精品啪啪啪视频| 粉嫩av四季av绯色av第一区| 日本精品免费在线观看| 麻豆乱码国产一区二区三区| 91精品一区二区三区四区| 欧美综合在线观看| 一区二区在线观看网站| 日韩中文字幕免费看| 国产乱码精品一区二区三区日韩精品| 在线观看免费黄色片| 91精品视频专区| 三年中国中文在线观看免费播放| 国产精品视频网| 国产一区二区在线免费| 一区二区三区视频在线播放| 国产精品夜色7777狼人| 午夜精品久久久久久99热| 久久久久久一区二区三区| 欧美亚洲国产精品| 精品国产一区二区三区日日嗨| 成人精品小视频| 欧美激情亚洲一区| 成人www视频在线观看| 亚洲一区中文字幕在线观看| 久久免费看毛片| 欧美日韩天天操| 精品国产一区二区三区麻豆免费观看完整版| 91免费在线观看网站| 欧美在线视频二区| 亚洲一卡二卡三卡| 日韩专区在线播放| 国产欧美丝袜| 色狠狠久久av五月综合|| 久久九九热免费视频| caopor在线视频| 欧美日韩在线不卡视频| 亚洲欧洲国产精品久久| 久久精品电影网站| 97精品一区二区视频在线观看 | 狠狠97人人婷婷五月| 亚洲欧美日韩精品在线 | 色综合久久悠悠| 久久av一区二区三区亚洲| 国内自拍欧美激情| 日日碰狠狠躁久久躁婷婷| 精品久久久久av| 久久精品久久久久久国产 免费| 成人在线小视频| 红桃av在线播放| 性色av一区二区三区在线观看| 久久久99免费视频| 99热国产免费| 欧美久久久久久久久久久久久久| 永久免费看av| 久久色在线播放| 久久偷窥视频| 国产乱人伦精品一区二区三区| 日韩精品大片| 在线观看欧美亚洲| 国产精品久久久久9999爆乳 | 明星裸体视频一区二区| 熟女视频一区二区三区| 操日韩av在线电影| 国产精品av网站| 99久热re在线精品视频| 精品一区二区三区视频日产| 日韩免费毛片视频| 婷婷五月色综合| 欧美激情视频在线| 国产精品久久9| 久久精品视频播放| 久久精品国产亚洲一区二区| 久久久久久久久久伊人| 超碰在线97av| 国产免费毛卡片| 蜜桃传媒视频第一区入口在线看 | 国产欧美日韩视频| 欧美在线激情网| 欧美一级片中文字幕| 欧美麻豆久久久久久中文| 国产亚洲情侣一区二区无| 国产精品国产三级国产专区51 | 国产精品色悠悠| 日韩视频亚洲视频| 俺去啦;欧美日韩| 久久久久久久久久久99| 久久精品国产亚洲| 国产精品视频专区| 国产福利一区视频| 久久久影视精品| 国产精品com| 91精品久久久久久久久久久久久| 8090成年在线看片午夜| 91久久精品www人人做人人爽| 国产精品永久免费| 99热国产免费| 国产精品99久久久久久久| 国产精品aaa| 久久伦理网站| 久久久久久久久国产精品| www.欧美三级电影.com| 精品国模在线视频| 国产精品天天狠天天看| www国产精品com| 国产精品视频免费一区二区三区| 国产精品久久国产精品| www国产精品视频| 国产精品美女午夜av| 精品乱色一区二区中文字幕| 久久国产精品久久国产精品| 亚洲高清视频一区二区| 日本免费高清不卡| 免费特级黄色片| 国产伦精品一区二区三| 91免费精品视频| 久久久久久久免费| 欧美成aaa人片在线观看蜜臀| 欧美激情精品久久久久| 欧美巨猛xxxx猛交黑人97人| 一道本在线观看视频| 日本a级片电影一区二区| 免费在线观看毛片网站| 成人在线小视频| 色老头一区二区三区在线观看| 久久亚洲成人精品| 亚洲欧洲日夜超级视频| 青草成人免费视频| 爱福利视频一区二区| 久久久久久久国产精品视频| 久久综合五月天| 亚洲 高清 成人 动漫| 欧洲精品在线播放| 国产免费一区视频观看免费| 91精品国产综合久久香蕉最新版| 国产精品九九九| 日产日韩在线亚洲欧美| 国产在线精品一区二区三区》| 国产精彩视频一区二区| 国产精品久久久久福利|