Class ProxyingNetworkServiceProvider

extends ServiceProvider implements NetworkModule ServiceHandler
The ProxyingNetworkServiceProvider makes it easy to proxy a network interface and expose it as a provided service. The service can then be used across process boundaries, which makes it possible to run network drivers separate from the rest of the system.

Class summary


constructor name/string --major/int --minor/int --patch/int=

Constructors

constructor name/string --major/int --minor/int --patch/int=0

Methods

close-network network/Interface -> none
Closes the proxied network.

connect client/int -> List

connect -> none

disconnect -> none

handle index/int arguments/any --gid/int --client/int -> any

install -> none

on-closed client/int -> none

on-opened client/int -> none

Opens the proxied network.
Subclasses may decide to use the call to establish the underlying connection in which case the call may throw exceptions and possibly time out. In case of such exceptions, close-network is not called.

operator == other/any -> bool
Whether this object is equal to the other.
By default, identical is used for equality.
Inheritance
Classes overwrite this operator to get an equality specific to their needs. Equality operators often compare the type and field contents. For example:

class Pin:
  number/int

  constructor .number:

  operator == other:
    if other is not Pin: return false
    return number == other.number
A class doesn't have to follow the above format, but it must keep the operator in sync with any hash-code method. That is, if a class has a hash-code member, then the equality and hash-code must agree. If two instances are equal (a == b), then their hash codes must also be equal (a.hash-code == b.hash-code).

pid --client/int -> int

provides selector/ServiceSelector --handler/ServiceHandler --id/int=null --priority/int=PRIORITY-NORMAL --tags/List=null -> none
Registers a handler for the given selector.
This function should only be called from subclasses (typically in their constructor).

This service definition decides which groups of service methods should be proxied when a client connects. The service might ask clients to proxy all TCP-related calls through the service, but let them take care of DNS resolution on their own.
See the description of the proxy mask in the NetworkService interface.

quarantine name/string -> none
Requests quarantining the network identified by name.
Subclasses may override and act on the request.

resource client/int handle/int -> ServiceResource

resources-do [block] -> none

uninstall --wait/bool=false -> none

Fields

inherited

inherited

inherited

inherited

inherited