Go to the documentation of this file.
19 #ifndef __XRD_CL_SOCKET_HH__
20 #define __XRD_CL_SOCKET_HH__
24 #include <sys/socket.h>
35 class AsyncSocketHandler;
103 uint16_t timout = 10 );
113 uint16_t timout = 10 );
145 uint32_t &bytesRead );
156 uint32_t &bytesWritten );
272 const std::string &thehost = std::string() );
310 #endif // __XRD_CL_SOCKET_HH__
XRootDStatus ConnectToAddress(const XrdNetAddr &addr, uint16_t timout=10)
XRootDStatus ReadRaw(void *buffer, uint32_t size, int32_t timeout, uint32_t &bytesRead)
A network socket.
Definition: XrdClSocket.hh:41
XRootDStatus SetFlags(int flags)
Set the socket flags (man fcntl)
void SetStatus(SocketStatus status)
Set socket status - do not use unless you know what you're doing.
Definition: XrdClSocket.hh:131
std::string GetSockName() const
Get the name of the socket.
@ Disconnected
The socket is disconnected.
Definition: XrdClSocket.hh:48
AnyObject * pChannelID
Definition: XrdClSocket.hh:303
int GetFD()
Get the file descriptor.
Definition: XrdClSocket.hh:183
const AnyObject * GetChannelID() const
Definition: XrdClSocket.hh:224
XRootDStatus SetSockOpt(int level, int optname, const void *optval, socklen_t optlen)
Set socket options.
XRootDStatus WriteRaw(void *buffer, uint32_t size, int32_t timeout, uint32_t &bytesWritten)
std::string GetPeerName() const
Get the name of the remote peer.
@ Connecting
The connection process is in progress.
Definition: XrdClSocket.hh:50
XRootDStatus Poll(bool readyForReading, bool readyForWriting, int32_t timeout)
XRootDStatus GetSockOpt(int level, int optname, void *optval, socklen_t *optlen)
Get socket options.
SocketStatus pStatus
Definition: XrdClSocket.hh:297
bool IsCorked() const
Definition: XrdClSocket.hh:255
std::string pPeerName
Definition: XrdClSocket.hh:300
uint8_t MapEvent(uint8_t event)
std::string pSockName
Definition: XrdClSocket.hh:299
Request status.
Definition: XrdClXRootDResponses.hh:215
int pSocket
Definition: XrdClSocket.hh:296
std::string GetName() const
Get the string representation of the socket.
std::unique_ptr< Tls > pTls
Definition: XrdClSocket.hh:306
@ Connected
The socket is connected.
Definition: XrdClSocket.hh:49
XRootDStatus Send(const char *buffer, size_t size, int &bytesWritten)
Socket(int socket=-1, SocketStatus status=Disconnected)
int pProtocolFamily
Definition: XrdClSocket.hh:302
static XRootDStatus ClassifyErrno(int error)
Definition: XrdClAsyncSocketHandler.hh:39
const XrdNetAddr & GetServerAddress() const
Get the server address.
Definition: XrdClSocket.hh:206
void SetChannelID(AnyObject *channelID)
Definition: XrdClSocket.hh:215
Definition: XrdClAnyObject.hh:26
XRootDStatus Initialize(int family=AF_INET)
Initialize the socket.
XRootDStatus Read(char *buffer, size_t size, int &bytesRead)
SocketStatus
Status of the socket.
Definition: XrdClSocket.hh:47
XRootDStatus GetFlags(int &flags)
Get the socket flags (man fcntl)
std::string pName
Definition: XrdClSocket.hh:301
Definition: XrdNetAddr.hh:42
Definition: XrdClAnyObject.hh:33
bool pCorked
Definition: XrdClSocket.hh:304
XRootDStatus Connect(const std::string &host, uint16_t port, uint16_t timout=10)
SocketStatus GetStatus() const
Get the socket status.
Definition: XrdClSocket.hh:123
XrdNetAddr pServerAddr
Definition: XrdClSocket.hh:298
XRootDStatus TlsHandShake(AsyncSocketHandler *socketHandler, const std::string &thehost=std::string())