Changeset 203 for etherws


Ignore:
Timestamp:
08/02/12 00:30:06 (12 years ago)
Author:
atzm
Message:
  • identify server target strictly
File:
1 edited

Legend:

Unmodified
Added
Removed
  • etherws/trunk/etherws.py

    r202 r203  
    354354        self._debug = debug 
    355355 
    356     def get_target(self): 
    357         return self.request.remote_ip 
     356    @property 
     357    def target(self): 
     358        return ':'.join(str(e) for e in self.request.connection.address) 
    358359 
    359360    def open(self): 
     
    382383        self._tap = None 
    383384 
    384     def get_target(self): 
     385    @property 
     386    def target(self): 
    385387        if self.closed: 
    386388            return self._dev 
     
    453455            self._options['header'] = auth 
    454456 
    455     def get_target(self): 
     457    @property 
     458    def target(self): 
    456459        return self._url 
    457460 
     
    632635            'port':   port.number, 
    633636            'type':   port.interface.IFTYPE, 
    634             'target': port.interface.get_target(), 
     637            'target': port.interface.target, 
    635638            'tx':     port.tx, 
    636639            'rx':     port.rx, 
Note: See TracChangeset for help on using the changeset viewer.