17.10.2013 - Adjusted for QNX, PIPeer release for Windows, Remote console
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user