diff options
author | Matt Strapp <matt@mattstrapp.net> | 2022-04-25 17:48:52 -0500 |
---|---|---|
committer | Matt Strapp <matt@mattstrapp.net> | 2022-04-25 17:49:31 -0500 |
commit | 6889e2d66b710c241b3884fc28610a9e6be4e610 (patch) | |
tree | 30aabe5e28a4306c41d7d73a248ed174bd36f0a5 /include/server.hpp | |
download | csci4211-6889e2d66b710c241b3884fc28610a9e6be4e610.tar csci4211-6889e2d66b710c241b3884fc28610a9e6be4e610.tar.gz csci4211-6889e2d66b710c241b3884fc28610a9e6be4e610.tar.bz2 csci4211-6889e2d66b710c241b3884fc28610a9e6be4e610.tar.lz csci4211-6889e2d66b710c241b3884fc28610a9e6be4e610.tar.xz csci4211-6889e2d66b710c241b3884fc28610a9e6be4e610.tar.zst csci4211-6889e2d66b710c241b3884fc28610a9e6be4e610.zip |
A
Diffstat (limited to '')
-rw-r--r-- | include/server.hpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/server.hpp b/include/server.hpp new file mode 100644 index 0000000..ab77ad8 --- /dev/null +++ b/include/server.hpp @@ -0,0 +1,27 @@ +#ifndef server_H +#define server_H + +// Comms includes util.hpp +#include "comms.hpp" + +void SetNonBlockIO(int fd); +void RemoveConnection(int i); + +int Send_NonBlocking(int sockFD, BYTE *data, struct CONN_STAT *pStat, + struct pollfd *pPeer); +int Recv_NonBlocking(int sockFD, BYTE *data, struct CONN_STAT *pStat, + struct pollfd *pPeer); + +int processReception(int i); +void doServerCommand(int i); +void sendMessageToId(int id, bool reqLoggedIn, Header header, char *message); +void sendMessageToAllLoggedIn(Header header, char *message); +void sendMessageToAllLoggedInExceptSender(int senderID, Header header, + char *message); +void sendMessageToName(char *name, Header header, char *message); +void prepareMessage(int i, Header header, char *message); +void printServerCommand(int i); + +void DoServer(int svrPort); + +#endif |