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> 41 #include "hazelcast/client/Socket.h" 43 #include "hazelcast/client/Address.h" 44 #include "hazelcast/util/AtomicBoolean.h" 46 #include <boost/shared_ptr.hpp> 48 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64) 50 #pragma warning(disable: 4251) //for dll export 53 #if !defined(MSG_NOSIGNAL) 54 # define MSG_NOSIGNAL 0 86 int connect(
int timeoutInMillis);
95 int send(
const void *buffer,
int len,
int flag = 0);
104 int receive(
void *buffer,
int len,
int flag = 0);
109 int getSocketId()
const;
119 void setBlocking(
bool blocking);
121 std::auto_ptr<Address> localSocketAddress()
const;
127 void throwIOException(
const char *methodName,
const char *prefix)
const;
129 void throwIOException(
int error,
const char *methodName,
const char *prefix)
const;
133 struct addrinfo *serverInfo;
135 util::AtomicBoolean isOpen;
137 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64) 146 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64) IP Address.
Definition: Address.h:41
Sockets wrapper interface class.
Definition: Socket.h:34
Definition: MapEntryView.h:32
c Sockets wrapper class.
Definition: TcpSocket.h:64