# eric6.Cooperation.CooperationServer

Module implementing the cooperation server.

### Global Attributes

None

### Classes

CooperationServer | Class implementing the cooperation server.

### Functions

None

## CooperationServer

Class implementing the cooperation server.

### Signals

newConnection(connection)
  emitted after a new connection was received (Connection)

### Derived from

QTcpServer

### Class Attributes

None

### Class Methods

None

### Methods

CooperationServer | Constructor
incomingConnection | Public method handling an incoming connection.
startListening | Public method to start listening for new connections.

### Static Methods

None

#### CooperationServer (Constructor)

CooperationServer(address, parent=None)

Constructor

address
  address the server should listen on (QHostAddress)
parent
  reference to the parent object (QObject)

#### CooperationServer.incomingConnection

incomingConnection(socketDescriptor)

Public method handling an incoming connection.

socketDescriptor
  native socket descriptor (integer)

#### CooperationServer.startListening

startListening(port=-1, findFreePort=False)

Public method to start listening for new connections.

port
  port to listen on (integer)
findFreePort
  flag indicating to search for a free port depending on the configuration (boolean)

Returns:
  tuple giving a flag indicating success (boolean) and the port the server listens on

Up