Package wtf :: Package opi :: Module listener :: Class UnixSocket
[hide private]
[frames] | no frames]

Class UnixSocket

source code

     object --+    
              |    
SocketDecorator --+
                  |
                 UnixSocket

Decorator for UNIX domain sockets
Instance Methods [hide private]
 
__init__(self, socket, bindspec, path, umask)
Initialization
source code
 
close(self)
Remove the socket path and close the file handle
source code
 
bind(self)
Bind to the socket path
source code
int
family(self)
Determine the socket family
source code
any
key(self)
Determine the socket key
source code
any
anykey(self)
Determine ANY key
source code

Inherited from SocketDecorator: __cmp__, __del__, __eq__, __getattr__, __repr__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from SocketDecorator (private): _famcomp

Instance Variables [hide private]
bool _bound
Was the socket bound to a path?
str _normpath
The normalized path (symlinks resolved) (used as key)
str _path
The path to bind to
int _umask
The umask to be set when binding to the path (maybe None)

Inherited from SocketDecorator: bindspec, realsocket

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, socket, bindspec, path, umask)
(Constructor)

source code 
Initialization
Parameters:
  • socket (socket.socket) - The actual socket object
  • bindspec (str) - Binding string from configuration
  • path (str) - Path to bind to
  • umask (int) - Umask to apply when binding to the path
Overrides: object.__init__

bind(self)

source code 
Bind to the socket path
Overrides: SocketDecorator.bind

family(self)

source code 
Determine the socket family
Returns: int
The family
Overrides: SocketDecorator.family

key(self)

source code 
Determine the socket key
Returns: any
The key
Overrides: SocketDecorator.key

anykey(self)

source code 
Determine ANY key
Returns: any
The key
Overrides: SocketDecorator.anykey