Research and Realization of Netgame Server in Linux
- Author
- GaoQing
- Advisor
- ZhangNengLi
- School
- Wuhan University of Technology
- Major
- Applied Computer Technology
- Classification
- TP311.52 Software Development
- Degree
- Master's thesis
- Year
- 2009
- Downloads
- 117
- Citations
- 0
Abstract
In recent years,with the rapid development of Internet technology,as a favorite entertainment product by the majority of online game players,net game has also a great development.Online game imitate the realize society by its vivid picture,it is a very popular entertainment product.The large number of online games’ has reached one hundred thousands of players;a small number of online games have more than one million players.China has already larger netgame companies such as Shenda, Netease.Some internet companies also expand network business,Such as Sohu,Sina, Baidu and so on.Server is an important component of the netgame.It deals with all the messages which are sent by a large number of clients.Net game server’s performance,stability, security is becoming increasingly important.This article has done a detailed analysis and research for the server technology,realization.The article first introduced the basic technologies for the server,including c language,C + + language,STL,Multi-threaded programming,design patterns,C + + programming specification,Unix I/O,high-level Round API,network programming, Windows/MFC procedures,encryption algorithm,finding source flaw.ChapterⅢanalyzes server’s each layers and its module’s design file,detailed introduce the communications layer,message layer,application layer,business layer ’s design,and use graphical to demostrate the relationship between the various modules,each module’s function and it design schematic.ChapterⅣanalyzes the message layer,business layer and its detailed design file, detailed introduce Net game server’s message layer,business layer’s design detail, operation of various functions and the main design principle.And analyze the relationship between the various modules’s realization,function.ChapterⅤdesigns the function of business layer and the realization of the function,detailed introduce message layer,business layer’s code and step for every modules.And make specification for the key code segment. ChapterⅥdesigns the server layer and message layer’s test file,and detailed describe the test process and step.Firstly,do unit test for the server layer and message layer;secondly,do the function test for the business layer’s module,thirdly,do system integrated test,lastly,do the system performance test and security test.From net game server’s general design,detailed design,implementation,test,this article make a comprehensive introduction to net game server’s development process under linux.As to the security of data communication,this article use the RC4 algorithm to encrypt the data;as to the efficient process of data,this article use thread pool technology.The server completely use the C + + pattern to develop.In the develop process,use STL to enhance development efficiency.In order to reuse as much as possible,this article use the design pattern knowledge to realize several modules.This make the module and overall structure can be reused easily.
Table of contents
Abstract 4-6
Abstract 6-11
Chapter 1 Introduction 11-14
1.1 Background 11-12
1.2 subject source 12
1.3 of the work I have done 12-13
1.4 paper structure 13-14
basic knowledge of the
Chapter 2 online server 14-30
2.1 C, C, STL 14-18
2.1.1 C language 14-15
2.1.2 C 15-16
2.1.3 STL 16-18
2.2 multi-threaded 18-21
2.2.1 procedures and processes 18-19
2.2.2 thread and the thread of execution 19-20
2.2.3 program image layout 20-21
2.3 design patterns 21-23
2.3.1 Design Patterns concept 22-23
2.3.2 Design Patterns choice 23
2.3.3 Design Patterns use 23
2.4 C programming specifications 23-24
2.4.1 project and its style 24
2.4.2 Programming of several important aspects 24
2.4.3 C-class design and the use of the STL 24
2.5 UnixI / O, high-level round robin 24-25
2.6 Network Programming 25-26
2.7 Windows / MFC programming 26
2.8 encryption algorithm 26-28
2.8.1 one-way hash algorithm 27
2.8.2 symmetric encryption algorithm 27
2.8.3 public key encryption algorithm 27-28
2.8.4 some other algorithm 28
2.8.5 commonly used encryption library interface 28
2.9 source code vulnerability Find 28-30
2.9.1 Find the tools principle 28-29
2.9.2 Find the tools to use 29-30
Chapter 3, the overall design of the online game server 30-45
3.1 overall structure 30-31
3.2 server, the logical structure of 31-32
3.3 server layers of the module analysis 32-34
3.3.1 communication layers 32
3.3.2 Message Processing layer 32-33
3.3.3 Application Layer 33
3.3.4 business layer 33-34
3.4 component diagrams 34-45
3.4.1 communication layers 34-39
3.4.2 Message Processing 39-41
3.4.3 Application Layer 41
3.4.4 business layer 41-45
Chapter 4 detailed design 45-62
4.1 message handling 45-55
4.1.1 message data body 47
4.1.2 message header 47-49
4.1.3 message body 49-51
4.1.4 messages generated 51-52
4.1.5 message parsing 52-53
4.1.6 message pool 53-55
4.2 business layer 55-62
4.2.1 registration 55-56
4.2.2 Login 56-57
4.2.3 walk 57-58
4.2.4 to switch scenes 58-59
4.2.5 Chat 59-61
4.2.6 to enter / exit the message 61-62
Chapter 5
online game server implementation 62-80
5.1 message handling 62-73
5.1.1 message data body 62-63
5.1.2 network message packet 63-65
5.1.3 message header 65-68
5.1.4 messages generated 68-70
5.1.5 message pool 70-73
5.2 business layer 73-80
5.2.1 registration 73
5.2.2 Login 73-75
5.2.3 walk 75-76
5.2.4 to switch scenes 76-78
5.2.5 Chat 78-80
Chapter 6 test of the online game server 80-88
6.1 online test General 80
6.2 server unit test 80-83
6.2.1 communication layers test 80-83
6.2.2 Message Processing layer
test 83
6.3 server integration testing 83-86
6.4 server stress test 86-88
Chapter 7, Summary and Outlook 88-91
7.1 full-text summary of 88-89
7.2 project 89-90
7.3 projects for further research 90-91
References 91-94
thank 94-95
Appendix: master's degree during the published papers 95
Related dissertations
- OPC Server Development Based on Siemens PLC
- The Design and Development of Unattended Remote Measurement and Monitoring System in Steel Business
- Application on Virtualized High Availability System Design on Campus Network
- Design and Implementation of Network Security Detection System
- Design and Implementation of the ICS Server
- Design and Implementation of a Recommender System Framework Based on Collaborative Filtering Algorithm
- Design and Implementation of Remote Video Monitor System Based on Embedded Technology
- The Research and Implementation of Payment Terminals Based on Fingerprint Identification Technology
- The Design and Implementation of a Network Communication Game on Linux
- Design and Implement of Telematics System Service Center Subsystem
- Design and application of J2EE persistence layer framework DR-ORM
- Design and Implementation of Handheld Campus System Based on Theandroid Platform
- Design and Implemention of Android-based Taxi Reservations System
- The Research and Implementation of the College Counselors Skills Competition Training System
- Design and Implementation of Human Resource Management System for MIRLE Company
- Design and Implementation of SRCB Data Exchange Platform
- Design and Implementation of College Property Management System Based on B/S Mode
- Manufacturing Enterprise Fixed Assets Management System Design and Implementation
- The Design and Implementation of Layered Architecture and Design Patterns Based on.NET Platform
- Design and Implement of Office Automation System Based on the the MVC Design Pattern