19 #ifndef __XRD_CL_SOCKET_HH__
20 #define __XRD_CL_SOCKET_HH__
24 #include <sys/socket.h>
36 class AsyncSocketHandler;
105 uint16_t timout = 10 );
115 uint16_t timout = 10 );
147 uint32_t &bytesRead );
158 uint32_t &bytesWritten );
304 const std::string &thehost = std::string() );
342 #endif // __XRD_CL_SOCKET_HH__
XRootDStatus ConnectToAddress(const XrdNetAddr &addr, uint16_t timout=10)
std::string GetSockName() const
Get the name of the socket.
XRootDStatus SetSockOpt(int level, int optname, const void *optval, socklen_t optlen)
Set socket options.
Definition: XrdClAnyObject.hh:32
Socket(int socket=-1, SocketStatus status=Disconnected)
XRootDStatus GetSockOpt(int level, int optname, void *optval, socklen_t *optlen)
Get socket options.
std::string pPeerName
Definition: XrdClSocket.hh:332
The message representation used throughout the system.
Definition: XrdClMessage.hh:29
std::unique_ptr< Tls > pTls
Definition: XrdClSocket.hh:338
std::string GetPeerName() const
Get the name of the remote peer.
SocketStatus pStatus
Definition: XrdClSocket.hh:329
XRootDStatus SetFlags(int flags)
Set the socket flags (man fcntl)
std::string GetName() const
Get the string representation of the socket.
XRootDStatus ReadRaw(void *buffer, uint32_t size, int32_t timeout, uint32_t &bytesRead)
XRootDStatus Initialize(int family=AF_INET)
Initialize the socket.
SocketStatus GetStatus() const
Get the socket status.
Definition: XrdClSocket.hh:125
std::string pSockName
Definition: XrdClSocket.hh:331
const AnyObject * GetChannelID() const
Definition: XrdClSocket.hh:256
The socket is disconnected.
Definition: XrdClSocket.hh:50
std::string pName
Definition: XrdClSocket.hh:333
Definition: XrdNetAddr.hh:41
void SetChannelID(AnyObject *channelID)
Definition: XrdClSocket.hh:247
bool IsCorked() const
Definition: XrdClSocket.hh:287
uint8_t MapEvent(uint8_t event)
Definition: XrdOucIOVec.hh:65
XRootDStatus Connect(const std::string &host, uint16_t port, uint16_t timout=10)
void SetStatus(SocketStatus status)
Set socket status - do not use unless you know what you're doing.
Definition: XrdClSocket.hh:133
Request status.
Definition: XrdClXRootDResponses.hh:218
XRootDStatus GetFlags(int &flags)
Get the socket flags (man fcntl)
XRootDStatus TlsHandShake(AsyncSocketHandler *socketHandler, const std::string &thehost=std::string())
Definition: XrdSysKernelBuffer.hh:45
XRootDStatus WriteRaw(void *buffer, uint32_t size, int32_t timeout, uint32_t &bytesWritten)
XRootDStatus Poll(bool readyForReading, bool readyForWriting, int32_t timeout)
The socket is connected.
Definition: XrdClSocket.hh:51
AnyObject * pChannelID
Definition: XrdClSocket.hh:335
const XrdNetAddr * GetServerAddress() const
Get the server address.
Definition: XrdClSocket.hh:238
static XRootDStatus ClassifyErrno(int error)
int pProtocolFamily
Definition: XrdClSocket.hh:334
bool pCorked
Definition: XrdClSocket.hh:336
XRootDStatus Read(char *buffer, size_t size, int &bytesRead)
int pSocket
Definition: XrdClSocket.hh:328
SocketStatus
Status of the socket.
Definition: XrdClSocket.hh:48
XRootDStatus ReadV(iovec *iov, int iocnt, int &bytesRead)
std::unique_ptr< XrdNetAddr > pServerAddr
Definition: XrdClSocket.hh:330
A network socket.
Definition: XrdClSocket.hh:42
int GetFD()
Get the file descriptor.
Definition: XrdClSocket.hh:215
Definition: XrdClAsyncSocketHandler.hh:42
XRootDStatus Send(const char *buffer, size_t size, int &bytesWritten)
The connection process is in progress.
Definition: XrdClSocket.hh:52