basic implementation of client/server for AERPAW, whole lot of mess included

This commit is contained in:
2026-01-28 22:29:17 -08:00
parent b444e44d33
commit 8c5c315380
101 changed files with 1129 additions and 36 deletions

View File

@@ -0,0 +1,37 @@
//
// Academic License - for use in teaching, academic research, and meeting
// course requirements at degree granting institutions only. Not for
// government, commercial, or other organizational use.
//
// controller.cpp
//
// Code generation for function 'controller'
//
// Include files
#include "controller.h"
#include "controller_impl.h"
// Function Definitions
void controller(int numClients)
{
// Initialize server
initServer();
// Accept clients
for (int i{0}; i < numClients; i++) {
acceptClient(i + 1);
}
// Send messages to clients
for (int i{0}; i < numClients; i++) {
sendMessage(i + 1);
}
// Receive acknowledgements
for (int i{0}; i < numClients; i++) {
receiveAck(i + 1);
}
// Digest ACKs
// Close server
closeServer();
}
// End of code generation (controller.cpp)