change PIIODevice read* and write* methods size to "ssize_t"

This commit is contained in:
2022-08-01 18:52:30 +03:00
parent 1b499530c5
commit b1e220e454
39 changed files with 135 additions and 128 deletions

View File

@@ -6,14 +6,14 @@ public:
Client(PIEthernet * eth_) {
eth = eth_;
eth->startThreadedRead();
CONNECT2(void, const uchar *, int, eth, threadedReadEvent, this, readed);
CONNECT2(void, const uchar *, ssize_t, eth, threadedReadEvent, this, readed);
CONNECT1(void, bool, eth, disconnected, this, disconnected);
piCoutObj << uint(eth) << "client connected";
}
~Client() {}
EVENT_HANDLER2(void, readed, const uchar *, data, int, size) {
EVENT_HANDLER2(void, readed, const uchar *, data, ssize_t, size) {
PIByteArray ba(data, size);
piCoutObj << uint(eth) << "readed" << size << "bytes" << Hex << ba;
piCoutObj << uint(eth) << "readed" << size << "bytes" << PICoutManipulators::Hex << ba;
eth->write(ba);
}
EVENT_HANDLER1(void, disconnected, bool, withError) {