| |
- g
- socket._socketobject(__builtin__.object)
-
- eversocket
- threading.Thread(threading._Verbose)
-
- removeOldPeers
class eversocket(socket._socketobject) |
|
Custom self-closing socket for networking. |
|
- Method resolution order:
- eversocket
- socket._socketobject
- __builtin__.object
Methods defined here:
- __del__(self)
Data and other attributes defined here:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
Methods inherited from socket._socketobject:
- __init__(self, family=2, type=1, proto=0, _sock=None)
- accept(self)
- accept() -> (socket object, address info)
Wait for an incoming connection. Return a new socket representing the
connection, and the address of the client. For IP sockets, the address
info is a pair (hostaddr, port).
- bind(self, *args)
- bind(address)
Bind the socket to a local address. For IP sockets, the address is a
pair (host, port); the host must refer to the local host. For raw packet
sockets the address is a tuple (ifname, proto [,pkttype [,hatype]])
- close(self)
- close()
Close the socket. It cannot be used after this call.
- connect(self, *args)
- connect(address)
Connect the socket to a remote address. For IP sockets, the address
is a pair (host, port).
- connect_ex(self, *args)
- connect_ex(address) -> errno
This is like connect(address), but returns an error code (the errno value)
instead of raising an exception when an error occurs.
- dup(self)
- dup() -> socket object
Return a new socket object connected to the same system resource.
- fileno(self, *args)
- fileno() -> integer
Return the integer file descriptor of the socket.
- getpeername(self, *args)
- getpeername() -> address info
Return the address of the remote endpoint. For IP sockets, the address
info is a pair (hostaddr, port).
- getsockname(self, *args)
- getsockname() -> address info
Return the address of the local endpoint. For IP sockets, the address
info is a pair (hostaddr, port).
- getsockopt(self, *args)
- getsockopt(level, option[, buffersize]) -> value
Get a socket option. See the Unix manual for level and option.
If a nonzero buffersize argument is given, the return value is a
string of that length; otherwise it is an integer.
- gettimeout(self, *args)
- gettimeout() -> timeout
Returns the timeout in floating seconds associated with socket
operations. A timeout of None indicates that timeouts on socket
operations are disabled.
- listen(self, *args)
- listen(backlog)
Enable a server to accept connections. The backlog argument must be at
least 1; it specifies the number of unaccepted connection that the system
will allow before refusing new connections.
- makefile(self, mode='r', bufsize=-1)
- makefile([mode[, bufsize]]) -> file object
Return a regular file object corresponding to the socket. The mode
and bufsize arguments are as for the built-in open() function.
- sendall(self, *args)
- sendall(data[, flags])
Send a data string to the socket. For the optional flags
argument, see the Unix manual. This calls send() repeatedly
until all data is sent. If an error occurs, it's impossible
to tell how much data has been sent.
- setblocking(self, *args)
- setblocking(flag)
Set the socket to blocking (flag is true) or non-blocking (false).
setblocking(True) is equivalent to settimeout(None);
setblocking(False) is equivalent to settimeout(0.0).
- setsockopt(self, *args)
- setsockopt(level, option, value)
Set a socket option. See the Unix manual for level and option.
The value argument can either be an integer or a string.
- settimeout(self, *args)
- settimeout(timeout)
Set a timeout on socket operations. 'timeout' can be a float,
giving in seconds, or None. Setting a timeout of None disables
the timeout feature and is equivalent to setblocking(1).
Setting a timeout of zero is the same as setblocking(0).
- shutdown(self, *args)
- shutdown(flag)
Shut down the reading side of the socket (flag == SHUT_RD), the writing side
of the socket (flag == SHUT_WR), or both ends (flag == SHUT_RDWR).
Data and other attributes inherited from socket._socketobject:
- __slots__ = ['_sock', 'send', 'recv', 'sendto', 'recvfrom', '__weakref__']
- __weakref__ = <attribute '__weakref__' of '_socketobject' objects>
- list of weak references to the object (if defined)
- recv = <member 'recv' of '_socketobject' objects>
- recvfrom = <member 'recvfrom' of '_socketobject' objects>
- send = <member 'send' of '_socketobject' objects>
- sendto = <member 'sendto' of '_socketobject' objects>
|
class g |
| |
Data and other attributes defined here:
- BACKLOG = 5
- DB_NAME = 'evdb'
- HOST = 'hermit'
- MAX_NUM_PEERS = 50
- NAME = 'EverTracker'
- PORT = 6969
- SIZE = 1024
- VERSION = '0.4'
- con = None
- s = None
|
|