/EasySocket

EasySocket in C/C++ , cross-platform Socket

Primary LanguageC#MIT LicenseMIT

EasySocket

  • Full stack, cross-platform Socket uses C++ and Socket API to build a network communication engine with millions of processing capabilities
  • Full Stack Technical knowledge and design schemes in cross-platform courses can be applied to mainstream operating systems such as Windows/Linux/Android/iOS, and other languages supporting Socket have begun to use for reference.

Development tool

  • Windows 10 + Visual Studio 2017
  • Linux(ubuntu 16.04 64 bit)/GCC/Gedit editor
  • Android Windows 10 + Eclipse + NDK + JDK + ADT + ANT
  • iOS/MacOS MacOS (MacOS 10.1264 bit) + Xcode 9
  • Windows 10 + VS2017 + NDK + JDK + ADT + ANT
  • Auxiliary Tools Virtual Machine VMware Player, Code Management Tool, and Other Auxiliary Development Tools

Target

  • Design, coding, debugging and publishing of multi-platform C++ program
  • Select, IOCP, epoll network communication model, choose the most appropriate model for different scenarios.
  • Network Communication Using C++ TCP on Mainstream Platform
  • Using C++ TCP to communicate with server in mainstream game engine
  • The mainstream platform uses C++ TCP for network communication.
  • Server development performance optimization techniques.
  • Implementation and application of multi-threading, thread pool and memory pool under different platforms.
  • Develop a high performance communication engine with millions of processing power in C++.

Plan

  • How to build the C++ development environment under different platforms and share the application of code base.
  • Basic knowledge of Socket network communication.
  • Front-end (client) network communication, and practical application to the commercial tool engine.
  • Back-end (server) network communication, step by step to build high-performance servers. Connect to 10,000 user links from one user.Exploring performance bottlenecks,Solve the bottleneck, step by step, add optimization points, compare before and after,in-depth analysis of each optimization to solve those problems.

How to use

  • Running EasyTcpServer Server
  • Modify the server IP you want to connect to in client.cpp
  • Unity Opens Project CppNetworkPlugin
  • Modify the server IP to connect in CellClientNode.cs
  • File - > Build setting - > platform - > PC, Mac & Linux standalone
  • build and Run
  • iOS and Android platforms:
  • Modify the server IP to connect in CellClientNode. CS
  • File - > Build setting - > platform - > iOS / Android
  • build and Run

EasySocket

Socket、全栈、跨平台 Socket 运用C++和 Socket API来构建百万级处理能力的网络通信引擎,全栈跨平台技术知识和设计方案可以应用在Windows/Linux /Android/iOS等主流操作系统上,支持Socket的其他语言也开始借鉴使用

开发工具

  • Windows Windows10 + Visual Studio 2017 Linux Linux(ubuntu 16.04 64位)/GCC/Gedit

编辑器

  • Android Windows 10 + Eclipse + NDK + JDK + ADT + ANT iOS/ MacOS MacOS(MacOS 10.12 64位)+ Xcode 9 Windows 10 + VS2017 + NDK + JDK + ADT + ANT

辅助工具

  • 虚拟机VMware Player、代码管理工具、等其它辅助开发工具

目标

  • 多平台C++程序的设计、编码、调试、发布
  • select、IOCP、epoll网络通信模型,不同场景选择最合适的模型。
  • 主流平台下使用C++ TCP进行网络通信
  • 主流游戏引擎中使用C++ TCP与服务端通信
  • 主流平台下使用C++ TCP进行网络通信。
  • 服务器开发性能优化技巧。
  • 不同平台下多线程、线程池、内存池的实现和运用。
  • 用C++开发具有百万级处理能力的高性能通信引擎。

计划

  • 如何搭建不同平台下的C++开发环境、共享代码库的应用。
  • Socket网络通信基础知识。
  • 前端(客户端)网络通信,并实际应用到商业工具引擎中。
  • 后端(服务端)网络通信,一步一步建立高性能服务器从1个用户连接到10000个用户链接,从每秒1个用户/1个数据包,到1万用户/1百万个数据包,探索性能瓶颈,解决瓶颈,一步一步加入优化点,进行前后对比,深度解析每一个优化解决了那些问题

怎样使用?

  • 运行EasyTcpServer服务端
  • unity打开CppNetworkPlugin
  • 在EasyTcpClient中的client.cpp修改你所要连接的服务端IP
  • File->Build setting->platform->PC,Mac&Linux standalone
  • build and Run
  • iOS 和android 平台:
  • CellClientNode.cs 中修改要连接的服务端IP
  • File->Build setting->platform->iOS/android
  • build and Run

License EasySocket is released under the MIT license. See LICENSE for details.