1
0
mirror of https://github.com/anope/anope.git synced 2026-07-09 02:43:13 +02:00

Update Send and Recv to use ssize_t instead of int.

This commit is contained in:
Sadie Powell
2024-11-25 16:14:17 +00:00
parent e42b4c21b7
commit 3cbac4bcea
6 changed files with 21 additions and 21 deletions
+4 -4
View File
@@ -164,15 +164,15 @@ public:
* @param sz How much to read
* @return Number of bytes received
*/
virtual int Recv(Socket *s, char *buf, size_t sz);
virtual ssize_t Recv(Socket *s, char *buf, size_t sz);
/** Write something to the socket
* @param s The socket
* @param buf The data to write
* @param size The length of the data
*/
virtual int Send(Socket *s, const char *buf, size_t sz);
int Send(Socket *s, const Anope::string &buf);
virtual ssize_t Send(Socket *s, const char *buf, size_t sz);
ssize_t Send(Socket *s, const Anope::string &buf);
/** Accept a connection from a socket
* @param s The socket
@@ -503,7 +503,7 @@ public:
* @param sz The size of the buffer
* @return The amount of data read
*/
int Read(char *data, size_t sz);
ssize_t Read(char *data, size_t sz);
/** Mark the write end of this pipe (non)blocking
* @param state true to enable blocking, false to disable blocking