예제 #1
0
파일: endpoints.py 프로젝트: washort/typhon
def shutdownCB(shutdown, status):
    try:
        ruv.free(shutdown)
        # print "Shut down server, status", status
    except:
        if not we_are_translated():
            raise
예제 #2
0
파일: endpoints.py 프로젝트: dckc/typhon
def shutdownCB(shutdown, status):
    try:
        ruv.free(shutdown)
        # print "Shut down server, status", status
    except:
        if not we_are_translated():
            raise
예제 #3
0
파일: dns.py 프로젝트: markrwilliams/typhon
def gaiCB(gai, status, ai):
    status = intmask(status)
    vat, resolver = ruv.unstashGAI(gai)
    with scopedVat(vat):
        assert isinstance(resolver, LocalResolver), "implementation error"
        if status < 0:
            msg = ruv.formatError(status).decode("utf-8")
            resolver.smash(StrObject(u"libuv error: %s" % msg))
        else:
            gaiList = walkAI(ai)
            resolver.resolve(ConstList(gaiList[:]))
    ruv.freeAddrInfo(ai)
    ruv.free(gai)
예제 #4
0
def gaiCB(gai, status, ai):
    status = intmask(status)
    vat, resolver = ruv.unstashGAI(gai)
    with scopedVat(vat):
        assert isinstance(resolver, LocalResolver), "implementation error"
        if status < 0:
            msg = ruv.formatError(status).decode("utf-8")
            resolver.smash(StrObject(u"libuv error: %s" % msg))
        else:
            gaiList = walkAI(ai)
            resolver.resolve(ConstList(gaiList[:]))
    ruv.freeAddrInfo(ai)
    ruv.free(gai)
예제 #5
0
파일: signals.py 프로젝트: zarutian/typhon
 def disarm(self):
     unstashSignal(self._signal)
     SignalStop(self._signal)
     free(self._signal)