UNIX Network Programming Course Design

Source: Internet
Author: User

Directory

Chapter 1 Introduction 3

1.1 Background 3

1.2 meaning 3

1.3 contents and objectives of this study 3

Chapter 2 System Analysis 3

2.1 System Requirement Analysis 3

2.2 Technical Support for system development 4

2.3 business logic analysis 4

2.4 feasibility analysis 4

Chapter 3 General Design 4

3.1 overall system overview design 5

3.2 system function module design 5

3.2.1client: 5

3.2.2server: 5

Chapter 4 Detailed Design and Implementation 5

4.1 Introduction 5

4.1.1 writing Objective 5

4.1.2 references 5

4.2 In the range of 5

4.2.1 main system objective 5

4.2.2 design constraints, limit 5

4.3 Design Basis 6

4.4 development environment 6

4.4.1 hardware environment 6

4.4.2 software environment 6

4.5 terms, definitions and abbreviations 6

4.5.1 terms, definition 6

4.5.2 abbreviations 6

4.6 Module Design 7

4.6.1 sequence 7

Module client7

4.6.2 module description 7

4.6.3 function 7

4.6.4 Module Design 7

Module server8

4.6.5 module description 8

4.6.6 function 8

4.6.7 module design 8

4.7 Interface Design 8

4.7.1 main functions implemented by client TCP socket: 8

4.7.2 main functions implemented by TCP sockets on the server: 8

4.7.3 client implementation process 9

4.7.4 server implementation process 10

4.8 code design 10

Client: 10

Server: 12

4.9 client implementation: 15

4.10 server implementation: 16

Chapter V system test 17

5.1 use Column 1: 17

5.2 use Column 2: 18

5.3 use Column 3: 18

5.4 use Column 4: 19

5.5 use column 5: 20

5.6 test result rating 20

Chapter 6 Conclusion 21

Thank you 21

References 21


Chapter 1 Introduction

1.1 Background

Data communication and computer networks promote the development of modern information technology, and the importance of Network Information Systems to society is growing, the Talent Market urgently needs talents who can apply to network management, network maintenance, network information systems, network applications, network device R & D, and data communication value-added applications. However, we need to understand the operations of various systems. In UNIX operating systems, we can use socket programming interfaces to design computer communication programs. Understand its principles and methods.

1.2 Significance

Through design and development, we can achieve basic network communication, learn the implementation and principles of the process, and improve our programming and network communication knowledge.

1.3 contents and objectives of this study

Familiar with network socket programming, implement basic socket communication, master the socket communication process, and be familiar with the process and principle of sending and receiving information using the send () and Recv () functions. Implement multi-threaded processing of client requests on the server side.

Chapter II System Analysis

2.1 System Requirement Analysis

Main functions:

1) The client program performs TCP connection with the server,

2) The client inputs the character data, and the server receives the command and returns the date information to realize the date of the current system;

3) when the client inputs any string, the server receives the string and returns it to the client and displays it in reverse order to reverse the string;

4) The client enters the string close, and the server closes the connection to close the server;

5) The client enters the string quit, and the client closes the connection to close the client.

 

2.2 Technical Support for system development

1) environment requirements: VMware Workstation 8.0

RedHat. Enterprise. Linux. V6.

VI Editor

GCC compilation tool

2) development language: C Language

 

2.3 business logic analysis

1) connection module: the server creates a connection socket, binds a socket, listens to connection requests from the client, receives requests for connection, receives information, and sends information.

2) date module: obtains the data string input by the client from the console and sends it to the server. The server receives the string and uses the string as a signal. The server calls the current date function to read the current system date, send the date information to the client through the send function and display it on the client.

3) string inversion module: the client obtains the string (except data, close, and quit) from the console, reads the string length, displays it on the client, and sends the string to the server, the server receives the string and returns it to the client after the string is reversed. The client prints the reversed string.

4) Quit close module: the client reads the quit string from the console and sends the string to the server. After receiving the string, the server directly executes the server to close the connection function, disconnect the server.

5) close module: the client reads the close string from the console, and the client determines whether it is "close". If yes, the client actively executes the close connection function to close the connection.

2.4 Feasibility Analysis

Technically: This design adopts the C language program implementation, the language function is powerful, the technology is mature, the network programming function that can be used is many. It can be used as a working system design language, writing system applications, or as an application design language, writing applications that do not rely on computer hardware. It is widely used and has strong data processing capabilities. Operating on Redhat. Enterprise. Linux. V6 and virtual machines, this platform is mature and easy to develop. GCC is a standard compiler for most UNIX-like operating systems (such as Linux, BSD, and Mac OS X). GCC is also applicable to Microsoft Windows.

Economically: RedHat. Enterprise. Linux. V6 can be downloaded online for free. It is easy to install and can be implemented on a PC without any fees.

 

Detailed attachment downloadable

This article is from the network blog, please be sure to keep this source http://zznetwork.blog.51cto.com/9398550/1555178

UNIX Network Programming Course Design

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.