#include "gsocket.h"
#endif
+#ifndef OTUNIXERRORS
+
#include <MacHeaders.c>
#define OTUNIXERRORS 1
#include <OpenTransport.h>
#include <OpenTransportProviders.h>
#include <OpenTptInternet.h>
+#endif
+
/* Definition of GSocket */
class GSocket
{
public:
GSocket();
~GSocket();
- bool IsOK() { return m_ok; }
+ bool IsOk() { return m_ok; }
void Shutdown();
GSocketError SetLocal(GAddress *address);
GAddress *GetPeer();
GSocketError SetServer();
GSocket *WaitConnection();
- int SetReusable() { return 0; }
+ bool SetReusable() { return false; }
GSocketError SetNonOriented();
GSocketError Connect(GSocketStream stream);
int Read(char *buffer, int size);
int Write(const char *buffer, int size);
GSocketEventFlags Select(GSocketEventFlags flags);
- void SetNonBlocking(int non_block);
+ void SetNonBlocking(bool non_block);
void SetTimeout(unsigned long millisec);
GSocketError WXDLLIMPEXP_NET GetError();
void SetCallback(GSocketEventFlags flags,
GAddress *m_peer;
GSocketError m_error;
- int m_non_blocking;
- int m_server;
- int m_stream;
- int m_oriented;
+ bool m_non_blocking;
+ bool m_server;
+ bool m_stream;
+ bool m_oriented;
unsigned long m_timeout;
/* Callbacks */
GSocketEventFlags m_detected;
GSocketCallback m_cbacks[GSOCK_MAX_EVENT];
char *m_data[GSOCK_MAX_EVENT];
- int m_takesEvents ;
+ bool m_takesEvents ;
};