PlainTransport

class DIRAC.Core.DISET.private.Transports.PlainTransport.PlainTransport(stServerAddress, bServerMode=False, **kwargs)

Bases: DIRAC.Core.DISET.private.Transports.BaseTransport.BaseTransport

__init__(stServerAddress, bServerMode=False, **kwargs)

x.__init__(…) initializes x; see help(type(x)) for signature

acceptConnection()
bAllowReuseAddress = True
close()
getAppData()
getConnectingCredentials()
Returns:dictionnary with credentials

Return empty dictionnary for plainTransport.

In SSLTransport it contains (after the handshake):
  • ’DN’ : All identity name, e.g. `/C=ch/O=DIRAC/OU=DIRAC CI/CN=ciuser/emailAddress=lhcb-dirac-ci@cern.ch`
  • ’CN’ : Only the user name e.g. ciuser
  • ’x509Chain’ : List of all certificates in the chain
  • ’isProxy’ : True if the client use proxy certificate
  • ’isLimitedProxy’ : True if the client use limited proxy certificate
  • ’group’ (optional): Dirac group attached to the client
  • ’extraCredentials’ (optional): Extra credentials if exists

Before the handshake, dictionnary is empty

getFormattedCredentials()
getKeepAliveLapse()
getLastActionTimestamp()
getLocalAddress()
getRemoteAddress()
getSocket()
handshake()

This method is overwritten by SSLTransport if we use a secured transport.

iListenQueueSize = 5
iReadTimeout = 600
initAsClient()
initAsServer()
keepAliveMagic = 'dka'
latestServerRenewTime()
receiveData(maxBufferSize=0, blockAfterKeepAlive=True, idleReceive=False)
renewServerContext()
sendData(uData, prefix=False)
sendKeepAlive(responseId=None, now=False)
serverMode()
setAppData(appData)
setClientSocket(oSocket)
setExtraCredentials(group)
setSocketTimeout(timeout)

This method has to be overwritten, if we want to increase the socket timeout.

DIRAC.Core.DISET.private.Transports.PlainTransport.checkSanity(*args, **kwargs)
DIRAC.Core.DISET.private.Transports.PlainTransport.delegate(delegationRequest, kwargs)

Check delegate!