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() );
Definition: XrdClAnyObject.hh:33
Definition: XrdClAsyncSocketHandler.hh:39
A network socket.
Definition: XrdClSocket.hh:42
std::string GetSockName() const
Get the name of the socket.
std::string pSockName
Definition: XrdClSocket.hh:308
std::string GetName() const
Get the string representation of the socket.
XRootDStatus Send(const char *buffer, size_t size, int &bytesWritten)
XRootDStatus Initialize(int family=AF_INET)
Initialize the socket.
const AnyObject * GetChannelID() const
Definition: XrdClSocket.hh:233
Socket(int socket=-1, SocketStatus status=Disconnected)
SocketStatus
Status of the socket.
Definition: XrdClSocket.hh:48
@ Disconnected
The socket is disconnected.
Definition: XrdClSocket.hh:49
@ Connected
The socket is connected.
Definition: XrdClSocket.hh:50
@ Connecting
The connection process is in progress.
Definition: XrdClSocket.hh:51
void SetChannelID(AnyObject *channelID)
Definition: XrdClSocket.hh:224
SocketStatus pStatus
Definition: XrdClSocket.hh:306
XRootDStatus Send(XrdSys::KernelBuffer &kbuff)
AnyObject * pChannelID
Definition: XrdClSocket.hh:312
static XRootDStatus ClassifyErrno(int error)
XRootDStatus Read(char *buffer, size_t size, int &bytesRead)
std::unique_ptr< Tls > pTls
Definition: XrdClSocket.hh:315
XRootDStatus ConnectToAddress(const XrdNetAddr &addr, uint16_t timout=10)
int pSocket
Definition: XrdClSocket.hh:305
int GetFD()
Get the file descriptor.
Definition: XrdClSocket.hh:192
XRootDStatus SetSockOpt(int level, int optname, const void *optval, socklen_t optlen)
Set socket options.
bool IsCorked() const
Definition: XrdClSocket.hh:264
XRootDStatus TlsHandShake(AsyncSocketHandler *socketHandler, const std::string &thehost=std::string())
XRootDStatus GetFlags(int &flags)
Get the socket flags (man fcntl)
uint8_t MapEvent(uint8_t event)
std::string pName
Definition: XrdClSocket.hh:310
const XrdNetAddr * GetServerAddress() const
Get the server address.
Definition: XrdClSocket.hh:215
XRootDStatus Connect(const std::string &host, uint16_t port, uint16_t timout=10)
int pProtocolFamily
Definition: XrdClSocket.hh:311
XRootDStatus GetSockOpt(int level, int optname, void *optval, socklen_t *optlen)
Get socket options.
XRootDStatus WriteRaw(void *buffer, uint32_t size, int32_t timeout, uint32_t &bytesWritten)
std::string pPeerName
Definition: XrdClSocket.hh:309
bool pCorked
Definition: XrdClSocket.hh:313
XRootDStatus ReadRaw(void *buffer, uint32_t size, int32_t timeout, uint32_t &bytesRead)
SocketStatus GetStatus() const
Get the socket status.
Definition: XrdClSocket.hh:124
XRootDStatus Poll(bool readyForReading, bool readyForWriting, int32_t timeout)
std::unique_ptr< XrdNetAddr > pServerAddr
Definition: XrdClSocket.hh:307
void SetStatus(SocketStatus status)
Set socket status - do not use unless you know what you're doing.
Definition: XrdClSocket.hh:132
XRootDStatus SetFlags(int flags)
Set the socket flags (man fcntl)
std::string GetPeerName() const
Get the name of the remote peer.
Request status.
Definition: XrdClXRootDResponses.hh:215
Definition: XrdNetAddr.hh:42
Definition: XrdSysKernelBuffer.hh:46
Definition: XrdClAnyObject.hh:26