Learning Socket.IO
socket.io #socket.io Table of Contents About 1 Chapter 1: Getting started with socket.io 2 Remarks 2 Versions 2 Examples 3 Installation or Setup 3 "Hello world!" with socket messages. 4 Chapter sockets 6 Chapter 3: Fire Events 7 Examples 7 Fire Custom Events 7 Chapter 4: Handling users with socket.io 8 Introduction 8 Examples 8 Example Server Side code for handling Users 8 Simple Way To Emit with anyone you feel could benefit from it, downloaded the latest version from: socket-io It is an unofficial and free socket.io ebook created for educational purposes. All the content is extracted from0 码力 | 15 页 | 870.16 KB | 1 年前3Steering connections to sockets with BPF socket lookup hook
Steering connections to sockets with BPF socket lookup hook Jakub Sitnicki, Cloudflare @jkbs0 @cloudflare October 28-29, 2020 Who am I? ● Software Engineer at Cloudflare Spectrum TCP/UDP reverse proxy & BPF subsystems Goal Run a TCP echo service on ports 7, 77, and 777 … using one TCP listening socket. Fun? We will need… ❏ VM running Linux kernel 5.9+ ❏ bpftool 5.9+ ❏ libbpf headers ❏ kernel are closed check VM IP What is socket lookup? raw PREROUTING filter INPUT conntrack routing decision mangle PREROUTING nat PREROUTING socket lookup socket receive buffer Application Protocol0 码力 | 23 页 | 441.22 KB | 1 年前3gevent-socketio Documentation Release 0.3.1
index modules | gevent-socketio 0.3.1 documentation » Gevent-socketio documentation Introduction Socket.IO is a WebSocket-like abstraction that enables real-time communication between a browser and a server gevent-socketio is a Python implementation of the protocol. The reference server implementation of Socket.IO runs on Node.js and was developed by LearnBoost. There are now server implementations in a variety gevent python WSGI server to use gevent- socketio. Namespaces: since you mostly have one websocket/socket.io endpoint per website, it is important to be able to namespace the different real-time activities0 码力 | 91 页 | 118.05 KB | 1 年前3Node.js Manual & Documentation
Event: 'close' o net.Socket new net.Socket([options]) socket.connect(port, [host], [callback]) socket.connect(path, [callback]) socket.bufferSize socket.setEncoding(encoding=null) ll) socket.setSecure() socket.write(data, [encoding], [callback]) socket.write(data, [encoding], [fileDescriptor], [callback]) socket.end([data], [encoding]) socket.destroy() destroy() socket.pause() socket.resume() socket.setTimeout(timeout, [callback]) socket.setNoDelay(noDelay=true) socket.setKeepAlive(enable=false, [initialDelay]) socket.remoteAddress0 码力 | 153 页 | 1.21 MB | 1 年前3Tornado 6.0 Documentation
given, can be used for flow control: it will be run when all flushed data has been written to the socket. Note that only one flush callback can be outstanding at a time; if another flush occurs before the binary: bool = False) → Future[None][source] Sends the given message to the client of this Web Socket. The message may be either a string or a dict (which will be encoded as json). If the binary argument close(code: int = None, reason: str = None) → None[source] Closes this Web Socket. Once the close handshake is successful the socket will be closed. code may be a numeric status code, taken from the values0 码力 | 869 页 | 692.83 KB | 1 年前3Tornado 6.1 Documentation
binary: bool = False) → Future[None][source] Sends the given message to the client of this Web Socket. The message may be either a string or a dict (which will be encoded as json). If the binary argument Optional[int] = None, reason: Optional[str] = None) → None[source] Closes this Web Socket. Once the close handshake is successful the socket will be closed. code may be a numeric status code, taken from the values ssl_options may also be a dictionary of keyword arguments for the ssl.wrap_socket [https://docs.python.org/3.6/library/ssl.html#ssl.wrap_socket] method.: ssl_ctx = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)0 码力 | 931 页 | 708.03 KB | 1 年前3waitress Documentation v3.0.1
file_wrapper waitress-serve Socket Activation Glossary Change History 3.0.1 (unreleased) Fix a bug that would lead to Waitress busy looping on select() on a half-open socket due to a race condition that branch to "main" Fix a bug that would appear on macOS whereby if we accept() a socket that is already gone, setting socket options would fail and take down the server. See https://github.com/Pylons/waitress/pull/399 length checking had a calculation that was done incorrectly when the data was received across multple socket reads. This calculation has been corrected, and no longer will Waitress send back a 413 Request Entity0 码力 | 55 页 | 56.36 KB | 1 年前3waitress Documentation v3.0.1
UNIX domain socket (to serve a downstream HTTP server/proxy such as nginx, lighttpd, and so on), call serve with the unix_socket argument: from waitress import serve serve(wsgiapp, unix_socket='/path/to/unix PasteDeploy syntax for UNIX domain sockets is analogous: [server:main] use = egg:waitress#main unix_socket = /path/to/unix.sock You can find more settings to tweak (arguments to waitress.serve or equivalent Supports wsgi.file_wrapper protocol. 1.6 waitress API serve(app, listen='0.0.0.0:8080', unix_socket=None, unix_socket_perms='600', threads=4, url_scheme='http', url_prefix='', ident='waitress', backlog=10240 码力 | 119 页 | 339.46 KB | 1 年前3waitress Documentation v2.1.2
UNIX domain socket (to serve a downstream HTTP server/proxy such as nginx, lighttpd, and so on), call serve with the unix_socket argument: from waitress import serve serve(wsgiapp, unix_socket='/path/to/unix PasteDeploy syntax for UNIX domain sockets is analagous: [server:main] use = egg:waitress#main unix_socket = /path/to/unix.sock You can find more settings to tweak (arguments to waitress.serve or equivalent waitress Documentation, Release 2.1.2 1.6 waitress API serve(app, listen=’0.0.0.0:8080’, unix_socket=None, unix_socket_perms=’600’, threads=4, url_scheme=’http’, url_prefix=”, ident=’waitress’, backlog=10240 码力 | 115 页 | 272.79 KB | 1 年前3waitress Documentation v2.1.1
zope.server waitress API Arguments to waitress.serve Support for wsgi.file_wrapper waitress-serve Socket Activation Glossary Change History 2.1.1 Security Bugfix Waitress now validates that chunked OSError is no longer subscriptable, this caused failures on Windows attempting to loop to find an socket that would work for use in the trigger. See https://github.com/Pylons/waitress/pull/361 Fixed an the WSGI app starts sending data to the output buffer, we now attempt to send data directly to the socket. This avoids needing to wake up the main thread to start sending data. Allowing faster transmission0 码力 | 53 页 | 58.27 KB | 1 年前3
共 1000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 100