X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/1f6214607a4f2b727484a4ae9e9411044dae8051..f7b9fd9ef231946b4a1e5edf54c187e7ddbed8fe:/projects/stargazer/plugins/other/rscript/send_functor.h?ds=sidebyside diff --git a/projects/stargazer/plugins/other/rscript/send_functor.h b/projects/stargazer/plugins/other/rscript/send_functor.h index b9b789ea..dc8ad63a 100644 --- a/projects/stargazer/plugins/other/rscript/send_functor.h +++ b/projects/stargazer/plugins/other/rscript/send_functor.h @@ -27,21 +27,23 @@ #ifndef __SEND_FUNCTOR_H__ #define __SEND_FUNCTOR_H__ -#include -#include +#include "stg/os_int.h" #include -#include "stg/os_int.h" +#include +#include +#include +#include -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 +56,7 @@ class PacketSender : public std::unary_function { private: int sock; char * buffer; - int length; + size_t length; uint16_t port; };