MCPcopy Create free account
hub / github.com/Bitmessage/PyBitmessage / __init__

Method __init__

src/network/asyncore_pollchoose.py:928–939  ·  view source on GitHub ↗
(self, fd, map=None)

Source from the content-addressed store, hash-verified

926 class file_dispatcher(dispatcher):
927
928 def __init__(self, fd, map=None):
929 dispatcher.__init__(self, None, map)
930 self.connected = True
931 try:
932 fd = fd.fileno()
933 except AttributeError:
934 pass
935 self.set_file(fd)
936 # set it to non-blocking mode
937 flags = fcntl.fcntl(fd, fcntl.F_GETFL, 0)
938 flags = flags | os.O_NONBLOCK
939 fcntl.fcntl(fd, fcntl.F_SETFL, flags)
940
941 def set_file(self, fd):
942 self.socket = file_wrapper(fd)

Callers

nothing calls this directly

Calls 3

set_fileMethod · 0.95
filenoMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected