All Projects → jacking75 → edu_cpp_IOCP

jacking75 / edu_cpp_IOCP

Licence: MIT License
IOCP 실습

Programming Languages

C++
36643 projects - #6 most used programming language
C#
18002 projects
c
50402 projects - #5 most used programming language
lua
6591 projects

Projects that are alternatives of or similar to edu cpp IOCP

com2us cppNetStudy work
컴투스 C++ 네트워크 스터디 개인 작업 저장소
Stars: ✭ 32 (-34.69%)
Mutual labels:  tcp-server, korean, socket-programming
SuperSocketLite
SuperSocket 1.6 버전의 .NET Core 포팅
Stars: ✭ 48 (-2.04%)
Mutual labels:  tcp-server, socket-server, korean
Oksocket
An blocking socket client for Android applications.
Stars: ✭ 2,359 (+4714.29%)
Mutual labels:  tcp, tcp-server, socket-server
go-eventserver
A socket server which reads events from an event source and forwards them to the user clients when appropriate
Stars: ✭ 18 (-63.27%)
Mutual labels:  tcp, tcp-server, socket-server
tcp-net
Build tcp applications in a stable and elegant way
Stars: ✭ 42 (-14.29%)
Mutual labels:  tcp, tcp-server
SuperSimpleTcp
Simple wrapper for TCP client and server in C# with SSL support
Stars: ✭ 263 (+436.73%)
Mutual labels:  tcp, tcp-server
network
exomia/network is a wrapper library around System.Socket for easy and fast TCP/UDP client & server communication.
Stars: ✭ 18 (-63.27%)
Mutual labels:  tcp, tcp-server
workerman
An asynchronous event driven PHP socket framework. Supports HTTP, Websocket, SSL and other custom protocols. PHP>=5.4.
Stars: ✭ 10,005 (+20318.37%)
Mutual labels:  tcp, socket-server
QTcpSocket
A simple Qt client-server TCP architecture to transfer data between peers
Stars: ✭ 62 (+26.53%)
Mutual labels:  tcp, tcp-server
ctsTraffic
ctsTraffic is a highly scalable client/server networking tool giving detailed performance and reliability analytics
Stars: ✭ 125 (+155.1%)
Mutual labels:  tcp, tcp-server
easytcp
✨ 🚀 EasyTCP is a light-weight TCP framework written in Go (Golang), built with message router. EasyTCP helps you build a TCP server easily fast and less painful.
Stars: ✭ 416 (+748.98%)
Mutual labels:  tcp, tcp-server
khttpd
An experimental HTTP server implemented as Linux kernel module
Stars: ✭ 41 (-16.33%)
Mutual labels:  tcp, socket-programming
AsyncTcpClient
An asynchronous variant of TcpClient and TcpListener for .NET Standard.
Stars: ✭ 125 (+155.1%)
Mutual labels:  tcp, tcp-server
sockerl
Sockerl is an advanced Erlang/Elixir socket framework for TCP protocols and provides fast, useful and easy-to-use API for implementing servers, clients and client connection pools.
Stars: ✭ 26 (-46.94%)
Mutual labels:  socket-server, socket-programming
RRQMSocket
TouchSocket是.Net(包括 C# 、VB.Net、F#)的一个整合性的、超轻量级的网络通信框架。包含了 tcp、udp、ssl、http、websocket、rpc、jsonrpc、webapi、xmlrpc等一系列的通信模块。一键式解决 TCP 黏分包问题,udp大数据包分片组合问题等。使用协议模板,可快速实现「固定包头」、「固定长度」、「区间字符」等一系列的数据报文解析。
Stars: ✭ 286 (+483.67%)
Mutual labels:  tcp, iocp
tcpserver
A TCP Server with simple and clean API
Stars: ✭ 12 (-75.51%)
Mutual labels:  tcp, tcp-server
Socketify
Raw TCP and UDP Sockets API on Desktop Browsers
Stars: ✭ 67 (+36.73%)
Mutual labels:  tcp, tcp-server
twjitm-core
采用Netty信息加载实现长连接实时通讯系统,客户端可以值任何场景,支持实时http通讯、webSocket通讯、tcp协议通讯、和udp协议通讯、广播协议等 通过http协议,rpc协议。 采用自定义网络数据包结构, 实现自定义网络栈。
Stars: ✭ 98 (+100%)
Mutual labels:  tcp, tcp-server
L2-Emulator
Implementing a Layer-2 Emulator in C using Graphs and LinkedList
Stars: ✭ 17 (-65.31%)
Mutual labels:  tcp, socket-programming
cs
开箱即用的基于命令的消息处理框架,让 websocket 和 tcp 开发就像 http 那样简单
Stars: ✭ 19 (-61.22%)
Mutual labels:  tcp, tcp-server

IOCP 실습

코드에 버그가 있을 수 있다.(버그를 잡는 것도 공부!)
Modern C++을 적극적으로 사용하는 것을 추천한다.

'Tutorial/ChatServerWithLogger' 있는 프로젝트는 채팅 서버에 plog 라이브러리를 사용하고 있으며, Windows Event Log에 로그 데이터를 기록할 수 있다.

실습 계획

참석자의 실력에 따라 편차가 있겠지만 기본적으로 1회 모임에 2단계씩 진행을 한다.

  • 모임에서 직접 구현하기

  • 다음 모임까지 해야할 과제(과제를 구현한 코드는 다음에 모임에 배포 예정)

    • 과제로 구현할 기능을 이미 구현한 코드를 보여주면서 설명을 해줌(이렇게 해야 명확하게 무엇을 구현해야 할지 알 수 있을테니)
  • 1 단계. Echo 서버 코드 이해

    • IOCP에 대해서 설명한다.
  • 2 단계. OverlappedEx에 있는 버퍼 stClientInfo 구조체로 이동하기

  • 3 단계. 애플리케이션과 네트워크 코드 분리하기

    • 연결, 끊어짐, 데이터 받음을 애플리케이션에 전달하기
  • 4 단계. 네트워크와 로직 처리를 스레드 분리하기

    • Send를 Recv와 다른 스레드에서 하기
    • send를 연속으로 보낼 수 있는 구조가 되어야 한다.
  • 5 단계. 1-Send 구현하기

    • 버퍼에 쌓아 놓고, send 스레드에서 보내기.
  • 6 단계. 1-Send 구현하기

    • queue에 담아 놓고 순차적으로 보내기.
  • 7 단계. 비동기 Accept 사용하기

  • 8 단계 채팅 서버 만들기

    • 패킷 구조 사용하기, 로그인
  • 9 단계. 로그인 때 Redis 사용하기

  • 10 단계. 방 입장, 방 나가기, 방 채팅 구현하기

더 진행 한다면...

  • 11 단계. 최적화 하기
    • GetQueuedCompletionStatusEx 버전 사용하기
    • 서버에서 사용하는 설정을 입력 받기
    • 동적 할당을 최소화 하기
    • 링버퍼 구현 추가(덮어 쓰기 방지)
    • Lock 사용 범위를 줄이거나 좀 더 가벼운 Lock 사용하기
    • 더미 클라이언트로 테스트 하기
  • 12 단계. Network, Content, Host 각 레이어로 프로젝트 나누기
    • Network, Content는 각각 정적 라이브러리로 만든다.
    • Host는 콘솔 프로젝트. Network, Content 라이브러리를 사용한다.

참고 글 모음

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].