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)
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:300
std::unique_ptr< Tls > pTls
Definition: XrdClSocket.hh:306
std::string GetPeerName() const
Get the name of the remote peer.
SocketStatus pStatus
Definition: XrdClSocket.hh:297
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:123
std::string pSockName
Definition: XrdClSocket.hh:299
const AnyObject * GetChannelID() const
Definition: XrdClSocket.hh:224
const XrdNetAddr & GetServerAddress() const
Get the server address.
Definition: XrdClSocket.hh:206
The socket is disconnected.
Definition: XrdClSocket.hh:48
std::string pName
Definition: XrdClSocket.hh:301
Definition: XrdNetAddr.hh:41
void SetChannelID(AnyObject *channelID)
Definition: XrdClSocket.hh:215
bool IsCorked() const
Definition: XrdClSocket.hh:255
uint8_t MapEvent(uint8_t event)
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:131
Request status.
Definition: XrdClXRootDResponses.hh:214
XRootDStatus GetFlags(int &flags)
Get the socket flags (man fcntl)
XRootDStatus TlsHandShake(AsyncSocketHandler *socketHandler, const std::string &thehost=std::string())
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:49
AnyObject * pChannelID
Definition: XrdClSocket.hh:303
static XRootDStatus ClassifyErrno(int error)
int pProtocolFamily
Definition: XrdClSocket.hh:302
XrdNetAddr pServerAddr
Definition: XrdClSocket.hh:298
bool pCorked
Definition: XrdClSocket.hh:304
XRootDStatus Read(char *buffer, size_t size, int &bytesRead)
int pSocket
Definition: XrdClSocket.hh:296
SocketStatus
Status of the socket.
Definition: XrdClSocket.hh:46
A network socket.
Definition: XrdClSocket.hh:40
int GetFD()
Get the file descriptor.
Definition: XrdClSocket.hh:183
Definition: XrdClAsyncSocketHandler.hh:38
XRootDStatus Send(const char *buffer, size_t size, int &bytesWritten)
The connection process is in progress.
Definition: XrdClSocket.hh:50