Coder Social home page Coder Social logo

codingassignment's Introduction

CodingAssignment for StreamLabs

Build

mkdir build
cd build
cmake -G [platform] .. (ex: cmake -G "Visual Studio 15 2017" ..)

Binaries

bin/test_server.exe
bin/test_client.exe
(test_server.exe must be executed at the first.)

Build With

JSON for Modern C++ - To serialize/deserialize

How to test

Excute test_server.exe first, then test_client.ext.

There are automatical 8 tests.

  1. The client sends integer value to the server, then receives the value that sent to the server synchronously.
  2. The client sends string value to the server, then receives the value that sent to the server synchronously.
  3. The client sends a certain structure to the server, then receives the structure that sent to the server synchronously.
  4. The client calls the sum function on the server, then receives the result of the sum function synchronously.
  5. The client sends integer value to the server, then receives the value that sent to the server asynchronously.
  6. The client sends string value to the server, then receives the value that sent to the server asynchronously.
  7. The client sends a certain structure to the server, then receives the structure that sent to the server asynchronously.
  8. The client calls the reverse function on the server, then receives the result of the reverse function asynchronously.

Implemenation

common.hpp

  • There are common definitions and classes for convenience.

server.hpp

  1. The server deserializes and classifies the serialized data that come from the client.
  2. The server resends the data that come from the client to verify or calls the custom function that was registered on the server.

client.hpp

  1. The client sends the serialized data to the server.
  2. the client receives the data that come from the server, then verifies the retured data.

codingassignment's People

Contributors

odol0503 avatar

Watchers

 avatar

Forkers

asdlei99

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.