Module: Utils::Probe::ServerHandling
- Included in:
- ProbeClient, ProbeServer
- Defined in:
- lib/utils/probe/server_handling.rb
Overview
A module that provides server handling functionality for creating and managing socket servers.
This module encapsulates the logic for initializing different types of socket servers based on the specified server type, supporting both TCP and domain socket configurations. It provides a centralized approach to server creation and management within the Utils library.
Instance Method Summary collapse
-
#create_server(server_url) ⇒ UnixSocks::TCPSocketServer, UnixSocks::DomainSocketServer
The create_server method initializes and returns a socket server instance based on the specified server URL configuration.
Instance Method Details
#create_server(server_url) ⇒ UnixSocks::TCPSocketServer, UnixSocks::DomainSocketServer
The create_server method initializes and returns a socket server instance based on the specified server URL configuration
This method acts as a factory for creating socket server objects, delegating to the UnixSocks.from_url method to construct either a TCP socket server or a domain socket server depending on the URL scheme provided
23 24 25 |
# File 'lib/utils/probe/server_handling.rb', line 23 def create_server(server_url) UnixSocks.from_url(server_url) end |