Changed 'recvAll' return type from std::string to char pointer, and created a non-blocking version of the function

This commit is contained in:
2024-02-28 00:04:43 -05:00
parent ba667d020d
commit a37ec79f09
2 changed files with 47 additions and 14 deletions

View File

@@ -33,9 +33,15 @@ public:
/* Method to send data in 'to_send' through the 'other_socket' socket */
void sendAll(std::string to_send);
/* Same as method above, with buffer and buffer size */
void sendAll(char* buffer, int size);
/* Method to receive data sent to the 'other_socket' socket */
std::string recvAll();
char* recvAll();
/* Non-blocking receive method - calls the method above after polling for data */
char* recvAllNB();
/* Returns socket identifier */
int getSockFD();