16 #ifndef HAZELCAST_CLIENT_INTERNAL_SOCKET_TCPSOCKET_H_
17 #define HAZELCAST_CLIENT_INTERNAL_SOCKET_TCPSOCKET_H_
19 #include "hazelcast/client/Socket.h"
21 #include "hazelcast/client/Address.h"
22 #include "hazelcast/util/AtomicBoolean.h"
25 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
27 #pragma warning(disable: 4251) //for dll export
30 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
31 #pragma comment(lib, "Ws2_32.lib")
35 typedef int socklen_t;
41 #include <sys/types.h>
42 #include <sys/socket.h>
43 #include <netinet/in.h>
44 #include <arpa/inet.h>
46 #include <sys/errno.h>
47 #include <sys/select.h>
52 #if !defined(MSG_NOSIGNAL)
53 # define MSG_NOSIGNAL 0
85 int connect(
int timeoutInMillis);
93 int send(
const void *buffer,
int len)
const;
102 int receive(
void *buffer,
int len,
int flag = 0)
const;
107 int getSocketId()
const;
127 void setBlocking(
bool blocking);
134 void throwIOException(
const char *methodName,
const char *prefix)
const;
136 void throwIOException(
int error,
const char *methodName,
const char *prefix)
const;
142 struct addrinfo *serverInfo;
144 util::AtomicBoolean isOpen;
146 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
155 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
IP Address.
Definition: Address.h:36
Sockets wrapper interface class.
Definition: Socket.h:31
Definition: MapEntryView.h:32
c Sockets wrapper class.
Definition: TcpSocket.h:63