GithubHelp home page GithubHelp logo

zeliard / riotcpserver Goto Github PK

View Code? Open in Web Editor NEW
83.0 83.0 32.0 534 KB

High Performance TCP server example using Windows Registered I/O (RIO)

License: MIT License

C++ 93.86% C 2.49% Erlang 3.31% Batchfile 0.34%

riotcpserver's People

Contributors

zeliard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

riotcpserver's Issues

Error attempting to build on Win 8.1 VS 2013 Update 3

Hi, I would like to try this example, however my attempts to build on Win 8.1 using VS 2013 update 3, however the following errors (below) resulted.

1>ClientSession.obj : error LNK2019: unresolved external symbol __imp__closesocket@4 referenced in function "public: void __thiscall ClientSession::Disconnect(enum DisconnectReason)" (?Disconnect@ClientSession@@QAEXW4DisconnectReason@@@z)
1>ClientSession.obj : error LNK2019: unresolved external symbol __imp__ioctlsocket@12 referenced in function "public: bool __thiscall ClientSession::OnConnect(unsigned int,struct sockaddr_in *)" (?OnConnect@ClientSession@@QAE_NIPAUsockaddr_in@@@z)
1>ClientSession.obj : error LNK2019: unresolved external symbol __imp__setsockopt@20 referenced in function "public: void __thiscall ClientSession::Disconnect(enum DisconnectReason)" (?Disconnect@ClientSession@@QAEXW4DisconnectReason@@@z)
1>RIOManager.obj : error LNK2001: unresolved external symbol __imp__setsockopt@20
1>Exception.obj : error LNK2019: unresolved external symbol _MiniDumpWriteDump@28 referenced in function "long __stdcall ExceptionFilter(struct _EXCEPTION_POINTERS *)" (?ExceptionFilter@@YGJPAU_EXCEPTION_POINTERS@@@z)
1>FastSpinlock.obj : error LNK2019: unresolved external symbol __imp__timeBeginPeriod@4 referenced in function "public: void __thiscall FastSpinlock::EnterLock(void)" (?EnterLock@FastSpinlock@@QAEXXZ)
1>FastSpinlock.obj : error LNK2019: unresolved external symbol __imp__timeEndPeriod@4 referenced in function "public: void __thiscall FastSpinlock::EnterLock(void)" (?EnterLock@FastSpinlock@@QAEXXZ)
1>RIOManager.obj : error LNK2019: unresolved external symbol __imp__accept@12 referenced in function "public: bool __thiscall RIOManager::StartAcceptLoop(void)" (?StartAcceptLoop@RIOManager@@QAE_NXZ)
1>RIOManager.obj : error LNK2019: unresolved external symbol __imp__bind@12 referenced in function "public: bool __thiscall RIOManager::Initialize(void)" (?Initialize@RIOManager@@QAE_NXZ)
1>RIOManager.obj : error LNK2019: unresolved external symbol __imp__getpeername@12 referenced in function "public: bool __thiscall RIOManager::StartAcceptLoop(void)" (?StartAcceptLoop@RIOManager@@QAE_NXZ)
1>RIOManager.obj : error LNK2019: unresolved external symbol __imp__htonl@4 referenced in function "public: bool __thiscall RIOManager::Initialize(void)" (?Initialize@RIOManager@@QAE_NXZ)
1>RIOManager.obj : error LNK2019: unresolved external symbol __imp__htons@4 referenced in function "public: bool __thiscall RIOManager::Initialize(void)" (?Initialize@RIOManager@@QAE_NXZ)
1>RIOManager.obj : error LNK2019: unresolved external symbol __imp__listen@8 referenced in function "public: bool __thiscall RIOManager::StartAcceptLoop(void)" (?StartAcceptLoop@RIOManager@@QAE_NXZ)
1>RIOManager.obj : error LNK2019: unresolved external symbol __imp__WSAStartup@8 referenced in function "public: bool __thiscall RIOManager::Initialize(void)" (?Initialize@RIOManager@@QAE_NXZ)
1>RIOManager.obj : error LNK2019: unresolved external symbol __imp__WSACleanup@0 referenced in function "public: __thiscall RIOManager::~RIOManager(void)" (??1RIOManager@@QAE@XZ)
1>RIOManager.obj : error LNK2019: unresolved external symbol __imp__WSAIoctl@36 referenced in function "public: bool __thiscall RIOManager::Initialize(void)" (?Initialize@RIOManager@@QAE_NXZ)
1>RIOManager.obj : error LNK2019: unresolved external symbol __imp__WSASocketW@24 referenced in function "public: bool __thiscall RIOManager::Initialize(void)" (?Initialize@RIOManager@@QAE_NXZ)
1>C:\Users\boh2\boh-Data\cpp\dl\server049\RIOTcpServer\Debug\EduServer_RIO.exe : fatal error LNK1120: 16 unresolved externals
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

very slow

I am new to tcp and sockets. I developed an Csharp echo-server and client using SocketAsyncEventArgs and TCP. Running a test using the Csharp server and client with 10 client connections, it transmits and receives back 1 million messages in 12.34 seconds. This is running on a quad-core Win 8.1 laptop. I am investigating RIO and tried your server with my csharp client. using the same parameters and machine as with the above Csharp test, it took 200 seconds (versus 12.24 seconds). Testing again with 4 connections, it took exactly the same time for 400,000 messages as it took for one million (200 seconds).

While I am continuing to investigate the possible reasons for this, I thought I should post this to determine if there is an obvious reason. I do prefix the message with the message length which my server tests to determine if/when the message has been fully received. Without looking further there appear to be two anomolies (1) the excessive time taken, and (2) the fact that using a smaller number of connections and messages, it took the same time to complete.

VS2013 컴파일 시 에러

ClientSession.obj : error LNK2019: __imp__closesocket@4 외부 기호(참조 위치: "public: void __thiscall ClientSession::Disconnect(enum DisconnectReason)" (?Disconnect@ClientSession@@QAEXW4DisconnectReason@@@z) 함수)에서 확인하지 못했습니다.

등의 컴파일 에러가 다수 뜨네요.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.