summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2024-11-25 16:14:17 +0000
committerSadie Powell <sadie@witchery.services>2024-11-25 16:14:17 +0000
commit3cbac4bcea7401b081f0e3e2d2d6dc94fe50ef15 (patch)
tree132b58ae4a42d11d636de659eb4d73dfb6672edc /include
parente42b4c21b7a317170cd1d2b41b2f6a1a837de041 (diff)
Update Send and Recv to use ssize_t instead of int.
Diffstat (limited to 'include')
-rw-r--r--include/sockets.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/sockets.h b/include/sockets.h
index 853ba0470..1f7f9acc2 100644
--- a/include/sockets.h
+++ b/include/sockets.h
@@ -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