"""
Abstract Client interface
"""
class Client (object) :
"""
A Client establishes a connection to some remote Service.
This is an abstract base class that is further impemented by e.g. TCP or SSL.
Note that a Client behaves more like a factory, such that the Client itself is not a Transport, one must instead
call .connect(), rather like one must call Service.accept().
"""
def __init__ (self, endpoint) :
"""
Connect to the given remote endpoint.
endpoint - the remote Endpoint to connect to
"""
raise NotImplementedError()
def connect (self, cls=None) :
"""
Perform the connect operation, returning a new Transport.
cls - optional transport-specific type to use for the new connection.
"""
raise NotImplementedError()
def connect_async (self, cls=None, reactor=None) :
raise NotImplementedError()