started reactor refactoring
This commit is contained in:
+14
-14
@@ -16,24 +16,24 @@ namespace matador::net {
|
||||
*/
|
||||
class tcp {
|
||||
public:
|
||||
typedef peer_base<tcp> peer; /**< Shortcut to a tcp based peer */
|
||||
typedef socket_stream<tcp> socket; /**< Shortcut to a tcp based socket */
|
||||
typedef socket_acceptor<tcp> acceptor; /**< Shortcut to a tcp based acceptor */
|
||||
typedef address_resolver<tcp> resolver; /**< Shortcut to a tcp based address resolver */
|
||||
typedef peer_base<tcp> peer; /**< Shortcut to a tcp-based peer */
|
||||
typedef socket_stream<tcp> socket; /**< Shortcut to a tcp-based socket */
|
||||
typedef socket_acceptor<tcp> acceptor; /**< Shortcut to a tcp-based acceptor */
|
||||
typedef address_resolver<tcp> resolver; /**< Shortcut to a tcp-based address resolver */
|
||||
|
||||
/**
|
||||
* Returns the type of the socket
|
||||
*
|
||||
* @return Type of the socket
|
||||
*/
|
||||
int type() const { return SOCK_STREAM; }
|
||||
static int type() { return SOCK_STREAM; }
|
||||
|
||||
/**
|
||||
* Returns the socket protocol
|
||||
*
|
||||
* @return Socket protocol
|
||||
*/
|
||||
int protocol() const { return IPPROTO_TCP; }
|
||||
static int protocol() { return IPPROTO_TCP; }
|
||||
|
||||
/**
|
||||
* Returns the socket family
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
static tcp v6() { return tcp(PF_INET6); }
|
||||
|
||||
private:
|
||||
explicit tcp(int family)
|
||||
explicit tcp(const int family)
|
||||
: family_(family)
|
||||
{}
|
||||
|
||||
@@ -74,24 +74,24 @@ private:
|
||||
class OOS_NET_API udp
|
||||
{
|
||||
public:
|
||||
typedef peer_base<udp> peer; /**< Shortcut to a udp based peer */
|
||||
typedef socket_stream<udp> socket; /**< Shortcut to a udp based socket */
|
||||
typedef socket_acceptor<udp> acceptor; /**< Shortcut to a udp based acceptor */
|
||||
typedef address_resolver<udp> resolver; /**< Shortcut to a udp based address resolver */
|
||||
typedef peer_base<udp> peer; /**< Shortcut to an udp-based peer */
|
||||
typedef socket_stream<udp> socket; /**< Shortcut to an udp-based socket */
|
||||
typedef socket_acceptor<udp> acceptor; /**< Shortcut to an udp-based acceptor */
|
||||
typedef address_resolver<udp> resolver; /**< Shortcut to an udp-based address resolver */
|
||||
|
||||
/**
|
||||
* Returns the type of the socket
|
||||
*
|
||||
* @return Type of the socket
|
||||
*/
|
||||
int type() const { return SOCK_DGRAM; }
|
||||
static int type() { return SOCK_DGRAM; }
|
||||
|
||||
/**
|
||||
* Returns the socket protocol
|
||||
*
|
||||
* @return Socket protocol
|
||||
*/
|
||||
int protocol() const { return IPPROTO_UDP; }
|
||||
static int protocol() { return IPPROTO_UDP; }
|
||||
|
||||
/**
|
||||
* Returns the socket family
|
||||
@@ -117,7 +117,7 @@ public:
|
||||
static udp v6() { return udp(PF_INET6); }
|
||||
|
||||
private:
|
||||
explicit udp(int family)
|
||||
explicit udp(const int family)
|
||||
: family_(family)
|
||||
{}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user