From 3cbac4bcea7401b081f0e3e2d2d6dc94fe50ef15 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Mon, 25 Nov 2024 16:14:17 +0000 Subject: Update Send and Recv to use ssize_t instead of int. --- include/sockets.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') 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 -- cgit