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

All Samples(24)  |  Call(14)  |  Derive(0)  |  Import(10)
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/examples/portforward.py   circuits(Download)
from circuits.app import Daemon
from circuits import handler, Component, Debugger
from circuits.net.events import close, Connect, write
from circuits.net.sockets import TCPClient, TCPServer
 
    sock = self._sockets[channel]
 
    self.fire(close(sock), "source")
 
    del self._sockets[channel]

src/c/i/circuits-3.0.0.dev/circuits/web/websockets/client.py   circuits(Download)
from circuits.web.client import NotConnected
from circuits.core.components import BaseComponent
from circuits.net.events import connect, write, close
from circuits.protocols.websocket import WebSocketCodec
 

src/c/i/circuits-3.0.0.dev/circuits/web/client.py   circuits(Download)
from circuits.web.headers import Headers
from circuits.net.sockets import TCPClient
from circuits.net.events import close, connect, write
from circuits.core import handler, BaseComponent, Event
 

src/c/i/circuits-3.0.0.dev/circuits/protocols/websocket.py   circuits(Download)
from circuits.core.handlers import handler
from circuits.core.components import BaseComponent
from circuits.net.events import write, read, close
 
 

src/c/i/circuits-3.0.0.dev/circuits/node/client.py   circuits(Download)
from circuits.net.sockets import TCPClient
from circuits import handler, BaseComponent
from circuits.net.events import close, connect, write
 
from .utils import dump_event, load_value

src/c/i/circuits-3.0.0.dev/circuits/web/http.py   circuits(Download)
 
from circuits.six import text_type
from circuits.net.events import close, write
from circuits.core import handler, BaseComponent, Value
 

src/c/i/circuits-3.0.0.dev/tests/node/test_node.py   circuits(Download)
 
from circuits import Component, Event
from circuits.net.events import close
from circuits.node import Node, remote
from circuits.net.sockets import UDPServer
    host, port = server.host, server.port
 
    server.fire(close())
    assert watcher.wait("closed")
 

src/c/i/circuits-3.0.0.dev/tests/net/test_udp.py   circuits(Download)
from circuits import Manager
from circuits.core.events import unregister
from circuits.net.events import close, write
from circuits.core.pollers import Select, Poll, EPoll, KQueue
from circuits.net.sockets import UDPServer, UDPClient, UDP6Server, UDP6Client
        assert pytest.wait_for(server, "data", b"foo")
 
        client.fire(close())
        assert pytest.wait_for(client, "closed")
 
        server.fire(close())
        host, port = server.host, server.port
 
        server.fire(close())
        assert pytest.wait_for(server, "disconnected")
 

src/c/i/circuits-3.0.0.dev/tests/net/test_tcp.py   circuits(Download)
 
from circuits import Manager
from circuits.net.events import close, connect, write
from circuits.core.pollers import Select, Poll, EPoll, KQueue
from circuits.net.sockets import TCPServer, TCP6Server, TCPClient, TCP6Client
        assert pytest.wait_for(client, "data", b"foo")
 
        client.fire(close())
        assert pytest.wait_for(client, "disconnected")
        assert pytest.wait_for(server, "disconnected")
 
        server.fire(close())
 
        # disconnect
        client.fire(close())
        assert pytest.wait_for(client, "disconnected")
 
        assert pytest.wait_for(server, "data", b"foo")
 
        client.fire(close())
        assert pytest.wait_for(client, "disconnected")
        assert pytest.wait_for(server, "disconnected")

src/c/i/circuits-3.0.0.dev/tests/net/test_pipe.py   circuits(Download)
from circuits.net.sockets import Pipe
from circuits.core.pollers import Select
from circuits.net.events import close, write
 
from .client import Client
        assert pytest.wait_for(a, "data", b"foo")
 
        a.fire(close())
        assert pytest.wait_for(a, "disconnected")
 
        b.fire(close())