change PIIODevice read* and write* methods size to "ssize_t"
This commit is contained in:
@@ -28,7 +28,7 @@ int main(int argc, char * argv[]) {
|
||||
}
|
||||
}
|
||||
}));
|
||||
CONNECTL(&c, threadedReadEvent, ([&](const uchar * readed, int size){
|
||||
CONNECTL(&c, threadedReadEvent, ([&](const uchar * readed, ssize_t size){
|
||||
PIByteArray ba(readed, size);
|
||||
if (size < 1024) {
|
||||
PIString str = PIString(ba);
|
||||
@@ -41,7 +41,7 @@ int main(int argc, char * argv[]) {
|
||||
CONNECTL(&s, newConnection, ([&](PICloudServer::Client * cl){
|
||||
piCout << "[Server] new client:" << cl;
|
||||
clients << cl;
|
||||
CONNECTL(cl, threadedReadEvent, ([&c, &s, cl, &rnd](const uchar * readed, int size){
|
||||
CONNECTL(cl, threadedReadEvent, ([cl, &rnd](const uchar * readed, ssize_t size){
|
||||
PIByteArray ba(readed, size);
|
||||
PIString str = PIString(ba);
|
||||
piCout << "[Server] data from" << cl << ":" << str;
|
||||
|
||||
Reference in New Issue
Block a user