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

All Samples(16)  |  Call(6)  |  Derive(0)  |  Import(10)
connect Event

This Event is sent when a new client connection has arrived on a server.
This event is also used for client's to initiate a new connection to
a remote host.

.. note ::
    This event is used for both Client and Server Components.

:param args:  Client: (host, port) Server: (sock, host, port)(more...)

src/c/i/circuits-3.0.0.dev/examples/telnet.py   circuits(Download)
from circuits.io import stdin
from circuits import handler, Component
from circuits.net.events import connect, write
from circuits.net.sockets import TCPClient, UNIXClient
 

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/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/websockets/dispatcher.py   circuits(Download)
 
from circuits.six import b
from circuits.net.events import connect
from circuits.web.errors import httperror
from circuits import handler, BaseComponent

src/k/d/kdb-1.0.2/kdb/plugins/irc.py   kdb(Download)
 
 
from circuits.net.events import connect
from circuits.protocols.irc import QUIT, NICK
from circuits import handler, Component, Event

src/k/d/kdb-1.0.2/kdb/bot.py   kdb(Download)
 
 
from circuits.net.events import connect
from circuits.net.sockets import TCPClient
from circuits import handler, BaseComponent

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
        wait_host(server)
 
        client.fire(connect(server.host, server.port))
        assert pytest.wait_for(client, "connected")
        assert pytest.wait_for(server, "connected")
 
        # 1st connect
        client.fire(connect(server.host, server.port))
        assert pytest.wait_for(client, "connected")
        assert pytest.wait_for(server, "connected")
 
        # 2nd reconnect
        client.fire(connect(server.host, server.port))
        assert pytest.wait_for(client, "connected")
        assert pytest.wait_for(server, "connected")
 
        # 1st connect
        client.fire(connect(host, port))
        assert pytest.wait_for(client, "connected")
        assert isinstance(client.error, SocketError)

src/c/i/circuits-3.0.0.dev/tests/web/test_http.py   circuits(Download)
from circuits.web.client import parse_url
from circuits.net.sockets import TCPClient
from circuits.net.events import connect, write
 
 
 
    host, port, resource, secure = parse_url(webapp.server.http.base)
    client.fire(connect(host, port))
    assert pytest.wait_for(transport, "connected")