Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(11)  |  Call(4)  |  Derive(0)  |  Import(7)
close Event

This Event is used to notify a client, client connection or server that
we want to close.

.. note::
    - This event is never sent, it is used to close.
    - This event is used for both Client and Server Components.

:param args:  Client: () Server: (sock)(more...)

src/c/i/circuits-3.0.0.dev/tests/web/conftest.py   circuits(Download)
import pytest
 
from circuits.net.sockets import close
from circuits.web import Server, Static
from circuits import handler, Component, Debugger
    def finalizer():
        webapp.fire(close(), webapp.server)
        webapp.stop()
 
    request.addfinalizer(finalizer)

src/c/i/circuits-3.0.0.dev/tests/net/test_unix.py   circuits(Download)
 
from circuits import Manager
from circuits.net.sockets import close, connect, write
from circuits.net.sockets import UNIXServer, UNIXClient
from circuits.core.pollers import Select, Poll, EPoll, KQueue
        assert pytest.wait_for(server, "data", b"foo")
 
        client.fire(close())
        assert pytest.wait_for(client, "disconnected")
        assert pytest.wait_for(server, "disconnected")
 
        server.fire(close())