# eric7.RemoteServer.EricServerDebuggerRequestHandler

Module implementing the debugger request handler of the eric-ide server.

### Global Attributes

None

### Classes

EricServerDebuggerRequestHandler | Class implementing the debugger request handler of the eric-ide server.

### Functions

None

## EricServerDebuggerRequestHandler

Class implementing the debugger request handler of the eric-ide server.

### Derived from

EricServerBaseRequestHandler

### Class Attributes

None

### Class Methods

None

### Methods

EricServerDebuggerRequestHandler | Constructor
__acceptDbgClientConnection | Private method to accept the connection on the listening debug server socket.
__clientSocketDisconnected | Private method handling a socket disconnecting.
__mainClientExited | Private method to handle exiting of the main debug client.
__prepareClientCommand | Private method to prepare a command dictionary for the debug client.
__relayDebugClientCommand | Private method to relay a debug client command to the client.
__serviceDbgClientConnection | Private method to service the debug client connection.
__shutdownSocket | Private method to shut down a socket.
__startClient | Private method to start a debug client process.
__stopClient | Private method to stop the current debug client process.
initServerSocket | Public method to initialize the server socket listening for debug client connections.
shutdownClients | Public method to shut down all connected clients.

### Static Methods

None

#### EricServerDebuggerRequestHandler (Constructor)

EricServerDebuggerRequestHandler(server)

Constructor

server (EricServer)
  reference to the eric-ide server object

#### EricServerDebuggerRequestHandler.__acceptDbgClientConnection

__acceptDbgClientConnection(sock)

Private method to accept the connection on the listening debug server socket.

sock (socket.socket)
  reference to the listening socket

#### EricServerDebuggerRequestHandler.__clientSocketDisconnected

__clientSocketDisconnected(sock)

Private method handling a socket disconnecting.

sock (socket.socket)
  reference to the disconnected socket

#### EricServerDebuggerRequestHandler.__mainClientExited

__mainClientExited()

Private method to handle exiting of the main debug client.

#### EricServerDebuggerRequestHandler.__prepareClientCommand

__prepareClientCommand(command, params)

Private method to prepare a command dictionary for the debug client.

command (str)
  command to be sent
params (dict)
  dictionary containing the command parameters

Return:
  completed command dictionary to be sent to the debug client

Return Type:
  dict

#### EricServerDebuggerRequestHandler.__relayDebugClientCommand

__relayDebugClientCommand(params)

Private method to relay a debug client command to the client.

params (dict)
  dictionary containing the request data

#### EricServerDebuggerRequestHandler.__serviceDbgClientConnection

__serviceDbgClientConnection(key)

Private method to service the debug client connection.

key (selectors.SelectorKey)
  reference to the SelectorKey object associated with the connection to be serviced

#### EricServerDebuggerRequestHandler.__shutdownSocket

__shutdownSocket(debuggerId, sock)

Private method to shut down a socket.

debuggerId (str)
  ID of the debugger the socket belongs to
sock (socket.socket)
  reference to the socket

#### EricServerDebuggerRequestHandler.__startClient

__startClient(params)

Private method to start a debug client process.

params (dict)
  dictionary containing the request data

#### EricServerDebuggerRequestHandler.__stopClient

__stopClient(params)

Private method to stop the current debug client process.

params (dict)
  dictionary containing the request data

Return:
  dictionary containing the reply data

Return Type:
  dict

#### EricServerDebuggerRequestHandler.initServerSocket

initServerSocket()

Public method to initialize the server socket listening for debug client connections.

#### EricServerDebuggerRequestHandler.shutdownClients

shutdownClients()

Public method to shut down all connected clients.

Up