Problem: process_plug, get_new_reconnect_ivl and add_reconnect_timer duplicated across subclasses of stream_connector_base_t

Solution: pull up to stream_connector_base_t
This commit is contained in:
Simon Giesecke
2019-01-31 09:28:15 -05:00
parent 74667ebcba
commit 1a230e89ca
8 changed files with 61 additions and 139 deletions

View File

@@ -58,7 +58,6 @@ class tipc_connecter_t : public stream_connecter_base_t
};
// Handlers for incoming commands.
void process_plug ();
void process_term (int linger_);
// Handlers for I/O events.
@@ -69,9 +68,6 @@ class tipc_connecter_t : public stream_connecter_base_t
// Internal function to start the actual connection establishment.
void start_connecting ();
// Internal function to add a reconnect timer
void add_reconnect_timer ();
// Close the connecting socket.
void close ();
@@ -79,11 +75,6 @@ class tipc_connecter_t : public stream_connecter_base_t
// retired_fd if the connection was unsuccessful.
fd_t connect ();
// Internal function to return a reconnect backoff delay.
// Will modify the current_reconnect_ivl used for next call
// Returns the currently used interval
int get_new_reconnect_ivl ();
// Open IPC connecting socket. Returns -1 in case of error,
// 0 if connect was successful immediately. Returns -1 with
// EAGAIN errno if async connect was launched.