19 #ifndef __XRD_CL_SOCKET_HH__ 20 #define __XRD_CL_SOCKET_HH__ 24 #include <sys/socket.h> 107 uint16_t timout = 10 );
117 uint16_t timout = 10 );
148 Status ReadRaw(
void *buffer, uint32_t size, int32_t timeout,
149 uint32_t &bytesRead );
160 uint32_t &bytesWritten );
169 ssize_t
Send(
void *buffer, uint32_t size );
178 ssize_t
WriteV( iovec *iov,
int iovcnt );
242 Status Poll(
bool readyForReading,
bool readyForWriting,
256 #endif // __XRD_CL_SOCKET_HH__ Definition: XrdClAnyObject.hh:32
Socket(int socket=-1, SocketStatus status=Disconnected)
Definition: XrdClSocket.hh:55
std::string pPeerName
Definition: XrdClSocket.hh:249
Status WriteRaw(void *buffer, uint32_t size, int32_t timeout, uint32_t &bytesWritten)
Status Poll(bool readyForReading, bool readyForWriting, int32_t timeout)
SocketStatus pStatus
Definition: XrdClSocket.hh:246
Status Connect(const std::string &host, uint16_t port, uint16_t timout=10)
std::string pSockName
Definition: XrdClSocket.hh:248
The socket is disconnected.
Definition: XrdClSocket.hh:44
std::string pName
Definition: XrdClSocket.hh:250
Definition: XrdNetAddr.hh:41
Procedure execution status.
Definition: XrdClStatus.hh:109
void SetChannelID(AnyObject *channelID)
Definition: XrdClSocket.hh:215
ssize_t WriteV(iovec *iov, int iovcnt)
Status GetSockOpt(int level, int optname, void *optval, socklen_t *optlen)
Get socket options.
void SetStatus(SocketStatus status)
Set socket status - do not use unless you know what you're doing.
Definition: XrdClSocket.hh:135
Definition: XrdClAnyObject.hh:25
ssize_t Send(void *buffer, uint32_t size)
virtual ~Socket()
Desctuctor.
Definition: XrdClSocket.hh:65
std::string GetPeerName() const
Get the name of the remote peer.
Status Initialize(int family=AF_INET)
Initialize the socket.
Status SetFlags(int flags)
Set the socket flags (man fcntl)
Status GetFlags(int &flags)
Get the socket flags (man fcntl)
const AnyObject * GetChannelID() const
Definition: XrdClSocket.hh:224
The socket is connected.
Definition: XrdClSocket.hh:45
AnyObject * pChannelID
Definition: XrdClSocket.hh:252
const XrdNetAddr & GetServerAddress() const
Get the server address.
Definition: XrdClSocket.hh:206
int pProtocolFamily
Definition: XrdClSocket.hh:251
XrdNetAddr pServerAddr
Definition: XrdClSocket.hh:247
Status ConnectToAddress(const XrdNetAddr &addr, uint16_t timout=10)
std::string GetName() const
Get the string representation of the socket.
int pSocket
Definition: XrdClSocket.hh:245
Status ReadRaw(void *buffer, uint32_t size, int32_t timeout, uint32_t &bytesRead)
Status SetSockOpt(int level, int optname, const void *optval, socklen_t optlen)
Set socket options.
SocketStatus
Status of the socket.
Definition: XrdClSocket.hh:42
std::string GetSockName() const
Get the name of the socket.
A network socket.
Definition: XrdClSocket.hh:36
int GetFD()
Get the file descriptor.
Definition: XrdClSocket.hh:183
SocketStatus GetStatus() const
Get the socket status.
Definition: XrdClSocket.hh:127
The connection process is in progress.
Definition: XrdClSocket.hh:46