16 #ifndef HAZELCAST_CLIENT_INTERNAL_SOCKET_TCPSOCKET_H_ 17 #define HAZELCAST_CLIENT_INTERNAL_SOCKET_TCPSOCKET_H_ 19 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64) 20 #pragma comment(lib, "Ws2_32.lib") 24 typedef int socklen_t;
30 #include <sys/types.h> 31 #include <sys/socket.h> 32 #include <netinet/in.h> 33 #include <arpa/inet.h> 35 #include <sys/errno.h> 36 #include <sys/select.h> 38 #include <netinet/tcp.h> 43 #include <boost/shared_ptr.hpp> 45 #include "hazelcast/client/Socket.h" 46 #include "hazelcast/client/config/SocketOptions.h" 47 #include "hazelcast/client/Address.h" 48 #include "hazelcast/util/AtomicBoolean.h" 50 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64) 52 #pragma warning(disable: 4251) //for dll export 55 #if !defined(MSG_NOSIGNAL) 56 # define MSG_NOSIGNAL 0 88 int connect(
int timeoutInMillis);
97 int send(
const void *buffer,
int len,
int flag = 0);
106 int receive(
void *buffer,
int len,
int flag = 0);
111 int getSocketId()
const;
121 void setBlocking(
bool blocking);
123 std::auto_ptr<Address> localSocketAddress()
const;
130 void throwIOException(
const char *methodName,
const char *prefix)
const;
132 void throwIOException(
int error,
const char *methodName,
const char *prefix)
const;
138 struct addrinfo *serverInfo;
140 util::AtomicBoolean isOpen;
142 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64) 151 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64) IP Address.
Definition: Address.h:41
Sockets wrapper interface class.
Definition: Socket.h:34
TCP Socket options.
Definition: SocketOptions.h:32
PN (Positive-Negative) CRDT counter.
Definition: MapEntryView.h:32
c Sockets wrapper class.
Definition: TcpSocket.h:66