Skip to content

Commit

Permalink
[filter] Added 'open' phase to connect() filter
Browse files Browse the repository at this point in the history
  • Loading branch information
pajama-coder committed Jun 19, 2024
1 parent aa1d5c4 commit cae1935
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/outbound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ OutboundTCP::OutboundTCP(EventTarget::Input *output, const Outbound::Options &op
, SocketTCP(false, Outbound::m_options)
, m_resolver(Net::context())
{
state(Outbound::State::open);
}

OutboundTCP::~OutboundTCP() {
Expand Down Expand Up @@ -513,6 +514,7 @@ OutboundUDP::OutboundUDP(EventTarget::Input *output, const Outbound::Options &op
, SocketUDP(false, Outbound::m_options)
, m_resolver(Net::context())
{
state(Outbound::State::open);
}

OutboundUDP::~OutboundUDP() {
Expand Down Expand Up @@ -866,6 +868,7 @@ template<> void EnumDef<Outbound::Protocol>::init() {

template<> void EnumDef<Outbound::State>::init() {
define(Outbound::State::idle, "idle");
define(Outbound::State::open, "open");
define(Outbound::State::resolving, "resolving");
define(Outbound::State::connecting, "connecting");
define(Outbound::State::connected, "connected");
Expand Down
1 change: 1 addition & 0 deletions src/outbound.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class Outbound :

enum class State {
idle,
open,
resolving,
connecting,
connected,
Expand Down

0 comments on commit cae1935

Please sign in to comment.