Package app.ductape.sdk.cloud
Class VpcConnectorTunnelClient.VpcConnectorTunnelHandle
java.lang.Object
app.ductape.sdk.cloud.VpcConnectorTunnelClient.VpcConnectorTunnelHandle
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
- VpcConnectorTunnelClient
public static final class VpcConnectorTunnelClient.VpcConnectorTunnelHandle
extends Object
implements AutoCloseable
Live tunnel handle: a
stream_id-correlated WebSocket session plus the local loopback
TCP proxy that relays bytes to/from it. Mirrors TS's Duplex stream, but as a real
local socket so JDBC (no custom-stream hook) can dial it directly.-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()intstartLocalProxy(Duration acceptTimeout) Binds a loopback-only ephemeral TCP listener, returns the bound local port immediately, then in a background thread accepts exactly one connection withinacceptTimeoutbefore relaying bytes bidirectionally with the WebSocket using the samestream_dataJSON envelope framing as TS.streamId()
-
Method Details
-
streamId
-
startLocalProxy
Binds a loopback-only ephemeral TCP listener, returns the bound local port immediately, then in a background thread accepts exactly one connection withinacceptTimeoutbefore relaying bytes bidirectionally with the WebSocket using the samestream_dataJSON envelope framing as TS. Closes the listener immediately after accept (or on timeout). -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-