17.10.2013 - Adjusted for QNX, PIPeer release for Windows, Remote console

This commit is contained in:
peri4
2013-10-17 16:12:10 +04:00
parent 4b90f2818e
commit 0f1b528ac6
42 changed files with 585 additions and 171 deletions

View File

@@ -1,3 +1,6 @@
/*! \file piethernet.h
* \brief Ethernet device
*/
/*
PIP - Platform Independent Primitives
Ethernet, UDP/TCP Broadcast/Multicast
@@ -145,10 +148,8 @@ protected:
bool init();
bool openDevice();
bool closeDevice();
#ifdef WINDOWS
void closeSocket(int & sd) {if (sd != -1) {shutdown(sd, SD_BOTH); closesocket(sd);} sd = -1;}
#else
void closeSocket(int & sd) {if (sd != -1) {shutdown(sock, SHUT_RDWR); ::close(sd);} sd = -1;}
void closeSocket(int & sd);
#ifndef WINDOWS
static PIString getSockAddr(sockaddr * s) {return s == 0 ? PIString() : PIString(inet_ntoa(((sockaddr_in*)s)->sin_addr));}
#endif