parameters: (self, protocol, name, header=None)
docstring: ctor
          @param name str: identifier
          @param protocol TCPROSTransportProtocol protocol implementation    
          @param header dict: (optional) handshake header if transport handshake header was
          already read off of transport.
          @raise TransportInitError if transport cannot be initialized according to arguments
docstring_summary: ctor
docstring_tokens: ctor
function: def __init__(self, protocol, name, header=None):
          """
          ctor
          @param name str: identifier
          @param protocol TCPROSTransportProtocol protocol implementation    
          @param header dict: (optional) handshake header if transport handshake header was
          already read off of transport.
          @raise TransportInitError if transport cannot be initialized according to arguments
          """
          super(TCPROSTransport, self).__init__(protocol.direction, name=name)
          if not name:
              raise TransportInitError("Unable to initialize transport: name is not set")
  
          self.protocol = protocol
  
          self.socket = None
          self.endpoint_id = 'unknown'
          self.callerid_pub = 'unknown'
          self.dest_address = None # for reconnection
          
          if python3 == 0: # Python 2.x
              self.read_buff = StringIO()
              self.write_buff = StringIO()
          else: # Python 3.x
              self.read_buff = BytesIO()
              self.write_buff = BytesIO()
                      	    
          #self.write_buff = StringIO()
          self.header = header
  
          # #1852 have to hold onto latched messages on subscriber side
          self.is_latched = False
          self.latch = None
  
          # save the fileno separately so we can garbage collect the
          # socket but still unregister will poll objects
          self._fileno = None
          
          # these fields are actually set by the remote
          # publisher/service. they are set for tools that connect
          # without knowing the actual field name
          self.md5sum = None
          self.type = None 
  
          # Endpoint Details (IP, Port)
          self.local_endpoint = (None, None)
          self.remote_endpoint = (None, None)
function_tokens: def __init__ ( self , protocol , name , header = None ) : super ( TCPROSTransport , self ) . __init__ ( protocol . direction , name = name ) if not name : raise TransportInitError ( "Unable to initialize transport: name is not set" ) self . protocol = protocol self . socket = None self . endpoint_id = 'unknown' self . callerid_pub = 'unknown' self . dest_address = None # for reconnection if python3 == 0 : # Python 2.x self . read_buff = StringIO ( ) self . write_buff = StringIO ( ) else : # Python 3.x self . read_buff = BytesIO ( ) self . write_buff = BytesIO ( ) #self.write_buff = StringIO() self . header = header # #1852 have to hold onto latched messages on subscriber side self . is_latched = False self . latch = None # save the fileno separately so we can garbage collect the # socket but still unregister will poll objects self . _fileno = None # these fields are actually set by the remote # publisher/service. they are set for tools that connect # without knowing the actual field name self . md5sum = None self . type = None # Endpoint Details (IP, Port) self . local_endpoint = ( None , None ) self . remote_endpoint = ( None , None )