# Class: Service

## ProtoBuf .Builder. Service

Barebone of all runtime services.

#### new Service(rpcImplopt)

  Constructs a new runtime Service.

  ##### Parameters:

  Name | Type | Attributes | Description
  --- | --- | --- | ---
  `rpcImpl` | function | <optional> | RPC implementation receiving the method name and the message

  Source:
    - ProtoBuf.js, line 3370

  ##### Throws:

  If the service cannot be created
  Type
    Error

### Members

#### (non-null) rpcImpl :function

  Service implementation.

  ##### Type:

  - function
  Source:
    - ProtoBuf.js, line 3381

### Methods

#### (abstract, static) [Method](rpcImplnon-null, req, callback)

  Asynchronously performs an RPC call using the given RPC implementation.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `rpcImpl` | function | RPC implementation
  `req` | ProtoBuf.Builder.Message | Request
  `callback` | function | Callback receiving the error if any and the response either as a pre-parsed message or as its raw bytes

  Source:
    - ProtoBuf.js, line 3405

#### (abstract) [Method](req, callback)

  Asynchronously performs an RPC call using the instance's RPC implementation.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `req` | ProtoBuf.Builder.Message | Request
  `callback` | function | Callback receiving the error if any and the response either as a pre-parsed message or as its raw bytes

  Source:
    - ProtoBuf.js, line 3416