This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
void ticTacToe(); | |
void diplayGameBoard(char gameBoard[][3]); | |
void inputUserA(char gameBoard[][3]); | |
void inputUserB(char gameBoard[][3]); | |
bool isAWinner(char gameBoard[][3]); | |
bool isBWinner(char gameBoard[][3]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This program implements a Covid lookup service over TCP or Unix Data Socket. | |
It loads CSV Covid Dataset information using package lib (open github link at the end) and uses a simple text-based protocol to interact with the client and send the data. Clients send covid dataset search requests as a textual command in the form: | |
> nc localhost 4040 | |
> {“query”: {“region”: “Sindh”}} | |
> {“query”: {“date”: “4/4/2020”}} | |
for query It’s mendatory to follow the given JSON Structure as it is given above. | |
When the server receives the request, it is parsed and is then used to search the list of covid Dataset. The search result is then printed JSON Format dataset to the client. | |
Focus: | |
This version of the server uses TCP sockets (or UDS) to implement a simple text-based application-level protocol. There are no streaming strategy employed for the read/write operations. Buffers are read in one shot creating opportunities for missing data during read. | |
Testing: |