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