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 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:309
std::unique_ptr< Tls > pTls
Definition: XrdClSocket.hh:315
SocketStatus pStatus
Definition: XrdClSocket.hh:306
XRootDStatus SetFlags(int flags)
Set the socket flags (man fcntl)
XRootDStatus ReadRaw(void *buffer, uint32_t size, int32_t timeout, uint32_t &bytesRead)
XRootDStatus Initialize(int family=AF_INET)
Initialize the socket.
std::string pSockName
Definition: XrdClSocket.hh:308
The socket is disconnected.
Definition: XrdClSocket.hh:49
std::string pName
Definition: XrdClSocket.hh:310
Definition: XrdNetAddr.hh:41
void SetChannelID(AnyObject *channelID)
Definition: XrdClSocket.hh:224
uint8_t MapEvent(uint8_t event)
bool IsCorked() const
Definition: XrdClSocket.hh:264
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:132
Request status.
Definition: XrdClXRootDResponses.hh:218
Definition: XrdClAnyObject.hh:25
std::string GetPeerName() const
Get the name of the remote peer.
XRootDStatus GetFlags(int &flags)
Get the socket flags (man fcntl)
XRootDStatus TlsHandShake(AsyncSocketHandler *socketHandler, const std::string &thehost=std::string())
Definition: XrdSysKernelBuffer.hh:45
const AnyObject * GetChannelID() const
Definition: XrdClSocket.hh:233
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:50
AnyObject * pChannelID
Definition: XrdClSocket.hh:312
static XRootDStatus ClassifyErrno(int error)
int pProtocolFamily
Definition: XrdClSocket.hh:311
bool pCorked
Definition: XrdClSocket.hh:313
std::string GetName() const
Get the string representation of the socket.
XRootDStatus Read(char *buffer, size_t size, int &bytesRead)
int pSocket
Definition: XrdClSocket.hh:305
SocketStatus
Status of the socket.
Definition: XrdClSocket.hh:47
std::unique_ptr< XrdNetAddr > pServerAddr
Definition: XrdClSocket.hh:307
std::string GetSockName() const
Get the name of the socket.
A network socket.
Definition: XrdClSocket.hh:41
int GetFD()
Get the file descriptor.
Definition: XrdClSocket.hh:192
const XrdNetAddr * GetServerAddress() const
Get the server address.
Definition: XrdClSocket.hh:215
SocketStatus GetStatus() const
Get the socket status.
Definition: XrdClSocket.hh:124
Definition: XrdClAsyncSocketHandler.hh:39
XRootDStatus Send(const char *buffer, size_t size, int &bytesWritten)
The connection process is in progress.
Definition: XrdClSocket.hh:51