# eric6.Utilities.BackgroundClient

Module implementing a Qt free version of a background client for the various checkers and other python interpreter dependent functions.

### Global Attributes

None

### Classes

BackgroundClient | Class implementing the main part of the background client.

### Functions

None

## BackgroundClient

Class implementing the main part of the background client.

### Derived from

object

### Class Attributes

backgroundClient

### Class Methods

None

### Methods

BackgroundClient | Constructor of the BackgroundClient class.
__initClientService | Private method to import the given module and register it as service.
__receive | Private methode to receive the given length of bytes.
__send | Private method to send a job response back to the BackgroundService.
run | Public method implementing the main loop of the client.

### Static Methods

None

#### BackgroundClient (Constructor)

BackgroundClient(host, port)

Constructor of the BackgroundClient class.

host
  ip address the background service is listening
port
  port of the background service

#### BackgroundClient.__initClientService

__initClientService(fn, path, module)

Private method to import the given module and register it as service.

fn
  service name to register (str)
path
  contains the path to the module (str)
module
  name to import (str)

Returns:
  text result of the import action (str)

#### BackgroundClient.__receive

__receive(length)

Private methode to receive the given length of bytes.

length
  bytes to receive (int)

Returns:
  received bytes or None if connection closed (str)

#### BackgroundClient.__send

__send(fx, fn, data)

Private method to send a job response back to the BackgroundService.

fx
  remote function name to execute (str)
fn
  filename for identification (str)
data
  return value(s) (any basic datatype)

#### BackgroundClient.run

run()

Public method implementing the main loop of the client.

Up