I'm building a client/server pair in C++, and I've used the winsock
for the communication. However, I'm not able to find any library in C++ by which I can implement something that, instead of sending requests directly from the client to the server, will store the request, and will later communicate with the server.
Is there any method or library for sending the request to something like a broker, and vice-versa? Something that will store the request, and then will communicate with the server. These are the libraries I'm already using:
#pragma comment( linker, "/defaultlib:ws2_32.lib")
#include <WinSock2.h>
#include <winsock.h>
#include <stdio.h>
#include <iostream>
#include <string.h>
#include <windows.h>
#include <ws2tcpip.h>
#include <fstream>
using namespace std;
#define HOSTNAME_LENGTH 20
#define RESP_LENGTH 40
#define FILENAME_LENGTH 20
#define REQUEST_PORT 5001
#define BUFFER_LENGTH 1024
#define TRACE 0
#define MSGHDRSIZE 8 //Message Header Size