# Struct ethcore_dapps::ServerBuilder [−] [src]

    pub struct ServerBuilder<T: Fetch = FetchClient> { /* fields omitted */ }

Webapps HTTP+RPC server build.

## Methods

### `impl ServerBuilder`
[src]

#### `fn new<P: AsRef<Path>>(dapps_path: P,
registrar: Arc<ContractClient>,
remote: Remote)
-> Self`

Construct new dapps server

### `impl<T: Fetch> ServerBuilder<T>`
[src]

#### `fn fetch<X: Fetch>(self, fetch: X) -> ServerBuilder<X>`

Set a fetch client to use.

#### `fn sync_status(self, status: Arc<SyncStatus>) -> Self`

Change default sync status.

#### `fn web_proxy_tokens(self, tokens: Arc<WebProxyTokens>) -> Self`

Change default web proxy tokens validator.

#### `fn signer_address(self, signer_address: Option<(String, u16)>) -> Self`

Change default signer port.

#### `fn allowed_hosts(self, allowed_hosts: Option<Vec<String>>) -> Self`

Change allowed hosts. `None` - All hosts are allowed `Some(whitelist)` - Allow only whitelisted hosts (+ listen address)

#### `fn extra_dapps<P: AsRef<Path>>(self, extra_dapps: &[P]) -> Self`

Change extra dapps paths (apart from `dapps_path`)

#### `fn start_unsecured_http(self,
addr: &SocketAddr,
handler: RpcHandler<Metadata>)
-> Result<Server, ServerError>`

Asynchronously start server with no authentication, returns result with `Server` handle on success or an error.

#### `fn start_basic_auth_http(self,
addr: &SocketAddr,
username: &str,
password: &str,
handler: RpcHandler<Metadata>)
-> Result<Server, ServerError>`

Asynchronously start server with `HTTP Basic Authentication`, return result with `Server` handle on success or an error.

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result
+
  Collapse/expand all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)