Made the 'recvAll' function return a char pointer instead of a std::string, this is better for portability. Also created a non-blocking version of the function.
This commit is contained in:
@@ -30,10 +30,13 @@ public:
|
||||
FOR UDP - Send data to the client, from which data was received.
|
||||
FOR UDP, this function MUST be called after recvAll() */
|
||||
void sendAll(std::string to_send);
|
||||
|
||||
|
||||
/* Receive data from peer socket */
|
||||
std::string recvAll();
|
||||
char* recvAll();
|
||||
|
||||
/* Non-blocking receive */
|
||||
char* recvAllNB();
|
||||
|
||||
/* Return the address of the peer */
|
||||
std::string get_peer_addr();
|
||||
|
||||
|
Reference in New Issue
Block a user