71 #ifndef HH_SENF_Socket_SocketProtocol_ 72 #define HH_SENF_Socket_SocketProtocol_ 1 75 #include <boost/noncopyable.hpp> 88 struct SocketPolicyBase;
118 virtual SocketPolicyBase
const &
policy()
const = 0;
143 virtual bool eof()
const = 0;
150 virtual void close();
165 virtual void state(SocketStateMap & map,
unsigned lod)
const;
210 FileHandle
fh()
const;
225 virtual std::unique_ptr<SocketBody> clone(
bool isServer)
const = 0;
226 virtual std::unique_ptr<SocketBody> clone(
int fd,
bool isServer)
const = 0;
253 template <
class SocketPolicy,
class Self>
276 Policy
const &
policy()
const;
289 virtual std::unique_ptr<SocketBody> clone(
bool isServer)
const;
290 virtual std::unique_ptr<SocketBody> clone(
int fd,
bool isServer)
const;
virtual bool eof() const =0
Check for end-of-file condition.
DVBDemux_Policy Policy
The protocols policy.
Generic SocketHandle with client interface.
virtual SocketPolicyBase const & policy() const =0
Access the policy instance.
Generic SocketHandle with server interface.
int fd() const
Get file descriptor.
Socket Protocol base class.
virtual void state(SocketStateMap &map, unsigned lod) const
Return socket state information.
virtual unsigned available() const =0
Return (maximum) number of bytes available for reading without < blocking.
FileHandle fh() const
Get a FileHandle for this instance.
Concrete Socket Protocol implementation base class.
Collection of policy classes.
virtual void close()
Close socket.
virtual void terminate() const
Forcibly close socket.
virtual ~SocketProtocol()=0