Socket.hpp   Socket.hpp 
skipping to change at line 70 skipping to change at line 70
#include <errno.h> #include <errno.h>
#include <string.h> // strerror #include <string.h> // strerror
#define ERRNO errno #define ERRNO errno
#define SETNONBLOCK(s) fcntl(s,F_SETFL,O_NONBLOCK) #define SETNONBLOCK(s) fcntl(s,F_SETFL,O_NONBLOCK)
#define SOCKLEN_T socklen_t #define SOCKLEN_T socklen_t
#define SOCKET int #define SOCKET int
#define IS_INVALID_SOCKET(fd) (fd<0) #define IS_INVALID_SOCKET(fd) (fd<0)
#define INVALID_SOCKET (-1) #define INVALID_SOCKET (-1)
#define STRERROR(x) strerror(x) #define STRERROR(x) strerror(x)
#endif //Q_OS_WIN32 #endif //Q_OS_WIN
long long int GetNow(void); long long int GetNow(void);
class Server; class Server;
class Socket class Socket
{ {
public: public:
virtual ~Socket() { hangup(); } virtual ~Socket() { hangup(); }
void hangup(); void hangup();
skipping to change at line 94 skipping to change at line 94
{ {
return IS_INVALID_SOCKET(fd); return IS_INVALID_SOCKET(fd);
} }
virtual bool isTcpConnection() const { return false; } virtual bool isTcpConnection() const { return false; }
virtual void sendPosition(unsigned int ra_int, int dec_int, int stat us) {Q_UNUSED(ra_int); Q_UNUSED(dec_int); Q_UNUSED(status);} virtual void sendPosition(unsigned int ra_int, int dec_int, int stat us) {Q_UNUSED(ra_int); Q_UNUSED(dec_int); Q_UNUSED(status);}
protected: protected:
Socket(Server &server, SOCKET fd) : server(server), fd(fd) {} Socket(Server &server, SOCKET fd) : server(server), fd(fd) {}
Server & server; Server & server;
#ifdef Q_OS_WIN32 #ifdef Q_OS_WIN
virtual int readNonblocking(char *buf, int count) virtual int readNonblocking(char *buf, int count)
{ {
return recv(fd, buf, count, 0); return recv(fd, buf, count, 0);
} }
virtual int writeNonblocking(const char *buf, int count) virtual int writeNonblocking(const char *buf, int count)
{ {
return send(fd, buf, count, 0); return send(fd, buf, count, 0);
} }
#else #else
int readNonblocking(void *buf, int count) int readNonblocking(void *buf, int count)
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/