X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/73f662acc31034cd98fdc6e157454f7763ef0792..1347f3d1e04bedd1508589173f577673ee2c5554:/projects/stargazer/plugins/other/rscript/send_functor.h diff --git a/projects/stargazer/plugins/other/rscript/send_functor.h b/projects/stargazer/plugins/other/rscript/send_functor.h index b9b789ea..a14fe20b 100644 --- a/projects/stargazer/plugins/other/rscript/send_functor.h +++ b/projects/stargazer/plugins/other/rscript/send_functor.h @@ -34,14 +34,14 @@ #include "stg/os_int.h" -class PacketSender : public std::unary_function { +class PacketSender : public std::unary_function { public: - PacketSender(int s, char * b, int l, uint16_t p) + PacketSender(int s, char * b, size_t l, uint16_t p) : sock(s), buffer(b), length(l), - port(p) {}; - int operator() (uint32_t ip) + port(p) {} + ssize_t operator() (uint32_t ip) { struct sockaddr_in sendAddr; @@ -54,7 +54,7 @@ class PacketSender : public std::unary_function { private: int sock; char * buffer; - int length; + size_t length; uint16_t port; };