@@ -50,7 +50,7 @@ class Connection : public std::enable_shared_from_this<Connection> {
5050
5151public:
5252 /* * Connection identifier */
53- using Tuple = std::pair<port_t , Socket>;
53+ using Tuple = std::pair<Socket , Socket>;
5454 /* * Interface for TCP states */
5555 class State ;
5656 /* * Disconnect event */
@@ -517,7 +517,7 @@ class Connection : public std::enable_shared_from_this<Connection> {
517517 * @return A "tuple" of [[local port], [remote ip, remote port]]
518518 */
519519 Connection::Tuple tuple () const noexcept
520- { return {local_port_ , remote_}; }
520+ { return {local_ , remote_}; }
521521
522522 // / --- State checks --- ///
523523
@@ -610,14 +610,15 @@ class Connection : public std::enable_shared_from_this<Connection> {
610610 * @return A 16 bit unsigned port number
611611 */
612612 port_t local_port () const noexcept
613- { return local_port_ ; }
613+ { return local_. port () ; }
614614
615615 /* *
616616 * @brief The local Socket bound to this connection.
617617 *
618618 * @return A TCP Socket
619619 */
620- Socket local () const noexcept ;
620+ Socket local () const noexcept
621+ { return local_; }
621622
622623 /* *
623624 * @brief The remote Socket bound to this connection.
@@ -777,7 +778,7 @@ class Connection : public std::enable_shared_from_this<Connection> {
777778 * @param[in] remote The remote socket
778779 * @param[in] callback The connection callback
779780 */
780- Connection (TCP& host, port_t local_port , Socket remote, ConnectCallback callback = nullptr );
781+ Connection (TCP& host, Socket local , Socket remote, ConnectCallback callback = nullptr );
781782
782783 Connection (const Connection&) = delete ;
783784 Connection (Connection&&) = delete ;
@@ -819,7 +820,7 @@ class Connection : public std::enable_shared_from_this<Connection> {
819820 TCP& host_;
820821
821822 /* End points. */
822- port_t local_port_ ;
823+ Socket local_ ;
823824 Socket remote_;
824825
825826 /* * The current state the Connection is in. Handles most of the logic. */
0 commit comments