Go to the documentation of this file.
19 #ifndef __XRD_CL_SOCKET_HH__
20 #define __XRD_CL_SOCKET_HH__
24 #include <sys/socket.h>
36 class AsyncSocketHandler;
104 uint16_t timout = 10 );
114 uint16_t timout = 10 );
146 uint32_t &bytesRead );
157 uint32_t &bytesWritten );
281 const std::string &thehost = std::string() );
319 #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:42
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:132
std::string GetSockName() const
Get the name of the socket.
@ Disconnected
The socket is disconnected.
Definition: XrdClSocket.hh:49
Definition: XrdSysKernelBuffer.hh:46
AnyObject * pChannelID
Definition: XrdClSocket.hh:312
int GetFD()
Get the file descriptor.
Definition: XrdClSocket.hh:192
const AnyObject * GetChannelID() const
Definition: XrdClSocket.hh:233
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:51
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:306
bool IsCorked() const
Definition: XrdClSocket.hh:264
std::string pPeerName
Definition: XrdClSocket.hh:309
uint8_t MapEvent(uint8_t event)
std::string pSockName
Definition: XrdClSocket.hh:308
Request status.
Definition: XrdClXRootDResponses.hh:219
int pSocket
Definition: XrdClSocket.hh:305
std::string GetName() const
Get the string representation of the socket.
std::unique_ptr< Tls > pTls
Definition: XrdClSocket.hh:315
@ Connected
The socket is connected.
Definition: XrdClSocket.hh:50
XRootDStatus Send(const char *buffer, size_t size, int &bytesWritten)
Socket(int socket=-1, SocketStatus status=Disconnected)
int pProtocolFamily
Definition: XrdClSocket.hh:311
const XrdNetAddr * GetServerAddress() const
Get the server address.
Definition: XrdClSocket.hh:215
static XRootDStatus ClassifyErrno(int error)
Definition: XrdClAsyncSocketHandler.hh:40
void SetChannelID(AnyObject *channelID)
Definition: XrdClSocket.hh:224
Definition: XrdClAnyObject.hh:26
XRootDStatus Initialize(int family=AF_INET)
Initialize the socket.
XRootDStatus Read(char *buffer, size_t size, int &bytesRead)
XRootDStatus Send(XrdSys::KernelBuffer &kbuff, int &bytesWritten)
SocketStatus
Status of the socket.
Definition: XrdClSocket.hh:48
XRootDStatus GetFlags(int &flags)
Get the socket flags (man fcntl)
std::string pName
Definition: XrdClSocket.hh:310
Definition: XrdNetAddr.hh:42
std::unique_ptr< XrdNetAddr > pServerAddr
Definition: XrdClSocket.hh:307
Definition: XrdClAnyObject.hh:33
bool pCorked
Definition: XrdClSocket.hh:313
XRootDStatus Connect(const std::string &host, uint16_t port, uint16_t timout=10)
SocketStatus GetStatus() const
Get the socket status.
Definition: XrdClSocket.hh:124
XRootDStatus TlsHandShake(AsyncSocketHandler *socketHandler, const std::string &thehost=std::string())