|
| ~Socket () override |
|
void | close () override |
|
int64_t | bytesPending () const override |
|
SocketState | state () const |
|
bool | bind (const std::shared_ptr< SockAddr > &addr) |
|
bool | listen (int backlog=50) |
|
Ptr | accept () |
|
bool | setBlocking (const bool set=true) |
|
void | disconnect () |
|
void | abort () |
|
bool | connect (std::shared_ptr< SockAddr > addr) |
|
bool | waitForConnected (int timeout=-1) |
|
bool | waitForAllBytesWritten (int timeout=-1) |
|
bool | waitForReadyRead (uint channel, int timeout=-1) override |
|
int | nativeSocket () const |
|
int | releaseSocket () |
|
SocketError | lastError () const |
|
SignalProxy< void()> | sigIncomingConnection () |
|
SignalProxy< void()> | sigConnected () |
|
SignalProxy< void()> | sigDisconnected () |
|
SignalProxy< void(Socket::SocketError)> | sigError () |
|
| ZYPP_DECLARE_FLAGS (OpenMode, OpenModeFlag) |
|
| IODevice () |
|
void | setReadChannel (uint channel) |
|
uint | currentReadChannel () const |
|
int | readChannelCount () const |
|
bool | canRead () const |
|
bool | canWrite () const |
|
bool | isOpen () const |
|
ByteArray | readAll () |
|
ByteArray | read (int64_t maxSize) |
|
int64_t | read (char *buf, int64_t maxSize) |
|
virtual ByteArray | readLine (const int64_t maxSize=0) |
|
virtual int64_t | bytesAvailable () const |
|
int64_t | readBufferCount () const |
|
bool | canReadLine () const |
|
ByteArray | readAll (uint channel) |
|
ByteArray | read (uint channel, int64_t maxSize) |
|
int64_t | read (uint channel, char *buf, int64_t maxSize) |
|
ByteArray | channelReadUntil (uint channel, const char delim, int64_t maxSize=0) |
|
ByteArray | channelReadLine (uint channel, int64_t maxSize=0) |
|
int64_t | channelReadLine (uint channel, char *buf, const int64_t maxSize) |
|
virtual int64_t | bytesAvailable (uint channel) const |
|
int64_t | readBufferCount (uint channel) const |
|
virtual int64_t | channelReadUntil (uint channel, char *buf, const char delimiter, const int64_t maxSize) |
|
bool | canReadLine (uint channel) const |
|
bool | canReadUntil (uint channel, const char delim) const |
|
int64_t | write (const ByteArray &data) |
|
int64_t | write (const char *data, int64_t len) |
|
bool | waitForReadyRead (int timeout) |
|
SignalProxy< void()> | sigReadyRead () |
|
SignalProxy< void(uint)> | sigChannelReadyRead () |
|
SignalProxy< void(int64_t)> | sigBytesWritten () |
|
SignalProxy< void()> | sigAllBytesWritten () |
|
SignalProxy< void(uint) > | sigReadChannelFinished () |
|
| Base () |
|
virtual | ~Base () |
|
WeakPtr | parent () const |
|
void | addChild (const Base::Ptr &child) |
|
void | removeChild (const Ptr &child) |
|
const std::unordered_set< Ptr > & | children () const |
|
std::thread::id | threadId () const |
|
template<typename T > |
std::vector< std::weak_ptr< T > > | findChildren () const |
|
template<typename T > |
std::shared_ptr< T > | shared_this () const |
|
template<typename T > |
std::shared_ptr< T > | shared_this () |
|
template<typename T > |
std::weak_ptr< T > | weak_this () const |
|
template<typename T > |
std::weak_ptr< T > | weak_this () |
|
template<typename SenderFunc , typename ReceiverFunc > |
auto | connect (SenderFunc &&sFun, typename internal::MemberFunction< ReceiverFunc >::ClassType &recv, ReceiverFunc &&rFunc) |
|
template<typename SenderFunc , typename ReceiverFunc , typename ... Tracker> |
std::enable_if_t< std::is_member_function_pointer_v< SenderFunc >, connection > | connectFunc (SenderFunc &&sFun, ReceiverFunc &&rFunc, const Tracker &...trackers) |
|
|
static Ptr | create (int domain, int type, int protocol) |
|
static Ptr | fromSocket (int fd, SocketState state) |
|
template<typename Obj , typename Functor > |
static decltype(auto) | make_base_slot (Obj *o, Functor &&f) |
|
template<typename SenderFunc , typename ReceiverFunc > |
static auto | connect (typename internal::MemberFunction< SenderFunc >::ClassType &s, SenderFunc &&sFun, typename internal::MemberFunction< ReceiverFunc >::ClassType &recv, ReceiverFunc &&rFunc) |
|
template<typename SenderFunc , typename ReceiverFunc , typename ... Tracker> |
static auto | connectFunc (typename internal::MemberFunction< SenderFunc >::ClassType &s, SenderFunc &&sFun, ReceiverFunc &&rFunc, const Tracker &...trackers) |
|
Combines Sockets with the zypp event loop. Generally every socket type that is supported by the socket(2) API should work, however currently only Unix Domain sockets are tested.
The useage pattern of this class is similar to the socket(2) API, on the server endpoint one listening socket is created and bound to a adress to accept incoming connections. For every appected connections a connected socket instance is returned which can be used for communication with the peer.
Definition at line 35 of file socket.h.