TunnelClient manages a WebSocket connection to the tunnel server
and forwards incoming requests to a local service.
Constructors
new(server_url :
String, local_port :
Int32, api_key :
String |
Nil = nil, local_host :
String = "localhost", subdomain :
String |
Nil = nil, auth :
String |
Nil = nil, request_store :
RequestStore |
Nil = nil)
SourceInstance methods
max_reconnect_attempts=(max_reconnect_attempts :
Int32)
Sourceon_connect
Set callback for when tunnel is connected and ready
Sourceon_disconnect
Set callback for disconnection
Sourceon_request
Set callback for each incoming request
Sourcerequest_store
Request store for inspector (optional)
Sourcerequest_store=(request_store : RequestStore | Nil)
Request store for inspector (optional)
Sourcerunning?
Returns true if the client is currently running (may be reconnecting)
Sourcestart
Start the tunnel client - connects and begins processing
Sourcestop
Stop the tunnel client and close connection
Sourcesubdomain=(subdomain :
String |
Nil)
Source