Tornado 4.5 Documentation
client/server implementation ## • Asynchronous networking tornado.io loop — Main event loop ☐ tornado.iostream — Convenient wrappers for non-blocking sockets ☐ tornado.netutil — Miscellaneous network utilities events ■ Callbacks and timeouts ■ Debugging and error handling ■ Methods for subclasses • tornado.iostream — Convenient wrappers for non-blocking sockets ○ Base class ■ Main interface ■ Methods for IOLoop subclasses and should not generally be used by application code. New in version 4.0. # tornado.iostream — Convenient wrappers for non-blocking sockets Utility classes to write to and read from non-blocking0 码力 | 333 页 | 322.34 KB | 2 年前3
Tornado 6.2 Documentation
bool Returns True if this PeriodicCallback has been started. New in version 4.1. ##### 6.4.2 tornado.iostream — Convenient wrappers for non-blocking sockets Utility classes to write to and read from non-blocking connect. A very simple (and broken) HTTP client using this class: import tornado.ioloop import tornado.iostream import socket async def main(): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0) simple echo server could be defined like this: from tornado.tcpserver import TCPServer from tornado.iostream import StreamClosedError class EchoServer(TCPServer): async def handle_stream(self, stream0 码力 | 260 页 | 1.06 MB | 2 年前3
Tornado 6.5 Documentationsimple TCP server: import asyncio import errno import functools import socket import tornado from tornado.iostream import IOStream async def handle_connection(connection, address): stream = IOStream(connection) is_running() → bool Returns True if this PeriodicCallback has been started. Added in version 4.1. 6.4.2 tornado.iostream — Convenient wrappers for non-blocking sockets Utility classes to write to and read from non-blocking simple echo server could be defined like this: from tornado.tcpserver import TCPServer from tornado.iostream import StreamClosedError class EchoServer(TCPServer): async def handle_stream(self, stream,0 码力 | 272 页 | 1.12 MB | 10 月前3
Tornado 6.4 Documentation
TCP server: import asyncio import errno import functools import socket import tornado from tornado.iostream import IOSream async def handle_connection(connection, address): stream = IOSream(connection) bool Returns True if this PeriodicCallback has been started. New in version 4.1. ##### 6.4.2 tornado.iostream — Convenient wrappers for non-blocking sockets Utility classes to write to and read from non-blocking simple echo server could be defined like this: from tornado.tcpserver import TCPServer from tornado.iostream import StreamClosedError class EchoServer(TCPServer): async def handle_stream(self, stream0 码力 | 268 页 | 1.09 MB | 2 年前3
Tornado 6.4 Documentation
TCP server: import asyncio import errno import functools import socket import tornado from tornado.iostream import IOSream async def handle_connection(connection, address): stream = IOSream(connection) bool Returns True if this PeriodicCallback has been started. New in version 4.1. ##### 6.4.2 tornado.iostream — Convenient wrappers for non-blocking sockets Utility classes to write to and read from non-blocking simple echo server could be defined like this: from tornado.tcpserver import TCPServer from tornado.iostream import StreamClosedError class EchoServer(TCPServer): async def handle_stream(self, stream0 码力 | 268 页 | 1.09 MB | 2 年前3
Tornado 6.4 Documentation
TCP server: import asyncio import errno import functools import socket import tornado from tornado.iostream import IOSream async def handle_connection(connection, address): stream = IOSream(connection) bool Returns True if this PeriodicCallback has been started. New in version 4.1. ##### 6.4.2 tornado.iostream — Convenient wrappers for non-blocking sockets Utility classes to write to and read from non-blocking simple echo server could be defined like this: from tornado.tcpserver import TCPServer from tornado.iostream import StreamClosedError class EchoServer(TCPServer): async def handle_stream(self, stream0 码力 | 268 页 | 1.09 MB | 2 年前3
Tornado 6.3 Documentation
TCP server: import asyncio import errno import functools import socket import tornado from tornado.iostream import IOSream async def handle_connection(connection, address): stream = IOSream(connection) bool Returns True if this PeriodicCallback has been started. New in version 4.1. ##### 6.4.2 tornado.iostream — Convenient wrappers for non-blocking sockets Utility classes to write to and read from non-blocking simple echo server could be defined like this: from tornado.tcpserver import TCPServer from tornado.iostream import StreamClosedError class EchoServer(TCPServer): async def handle_stream(self, stream0 码力 | 264 页 | 1.06 MB | 2 年前3
Tornado 5.1 Documentation
client/server implementation • Asynchronous networking • tornado.io loop — Main event loop tornado.iostream — Convenient wrappers for non-blocking sockets ☐ tornado.netutil — Miscellaneous network utilities events ■ Callbacks and timeouts Debugging and error handling ■ Methods for subclasses • tornado.iostream — Convenient wrappers for non-blocking sockets ○ Base class ■ Main interface ■ Methods for IOLoop subclasses and should not generally be used by application code. New in version 4.0. # tornado.iostream — Convenient wrappers for non-blocking sockets Utility classes to write to and read from non-blocking0 码力 | 359 页 | 347.32 KB | 2 年前3
Tornado 5.1 Documentation
subclasses and should not generally be used by application code. New in version 4.0. ##### 5.4.2 tornado.iostream — Convenient wrappers for non-blocking sockets Utility classes to write to and read from non-blocking simple echo server could be defined like this: from tornado.tcpserver import TCPServer from tornado.iostream import StreamClosedError from tornado import gen class EchoServer(TCPServer): async def asynchronous library that doesn’t rely on a stack_context-aware library like tornado.ioloop or tornado.iostream (for example, if you’re writing a thread pool), use stack_context.wrap() before any asynchronous0 码力 | 243 页 | 895.80 KB | 2 年前3
Tornado 6.1 Documentation
bool Returns True if this PeriodicCallback has been started. New in version 4.1. ##### 6.4.2 tornado.iostream — Convenient wrappers for non-blocking sockets Utility classes to write to and read from non-blocking simple echo server could be defined like this: from tornado.tcpserver import TCPServer from tornado.iostream import StreamClosedError from tornado import gen class EchoServer(TCPServer): async def now faster. • parse_body_arguments now accepts incompletely-escaped non-ASCII inputs. ### tornado.iostream • ssl.CertificateError during the SSL handshake is now handled correctly. • Reads that are0 码力 | 245 页 | 904.24 KB | 2 年前3
共 20 条
- 1
- 2













