;ELC ;;; Compiled ;;; in Emacs version 26.3 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\300\302!\210\300\303!\207" [require cl-lib rudel-backend rudel-transport] 2) #@41 Version of the TCP transport for Rudel. (defconst rudel-tcp-version '(0 2) (#$ . 511)) (byte-code "\300\301\302\303!\"\210\300\304\305\303!\"\210\300\306\304\"\210\307\306\310\311#\210\312\303\313\304#\314\303\315\316\317$\210\320\321\322\323\322\324%\210\320\325\322\326\322\327%\210\320\330\322\331\322\332%\210\320\333\322\334\322\335%\207" [defalias rudel-socket-transport-p eieio-make-class-predicate rudel-socket-transport rudel-socket-transport--eieio-childp eieio-make-child-predicate rudel-socket-transport-child-p make-obsolete "use (cl-typep ... \\='rudel-socket-transport) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (rudel-transport) ((socket :initarg :socket :type process :documentation "The socket represented by this transport object.") (filter :initarg :filter :type (or null function) :initform nil :reader rudel-filter :writer rudel-set-filter :documentation "The filter function. This function is not directly\ninstalled into the underlying process and therefore has to be\nstored separately.") (sentinel :initarg :sentinel :type (or null function) :initform nil :reader rudel-sentinel :writer rudel-set-sentinel :documentation "The sentinel function. This function is not\ndirectly installed into the underlying process and therefore has\nto be stored separately.")) (:documentation "Objects of this class use sockets to transport data.") cl-generic-define-method rudel-sentinel nil ((this rudel-socket-transport)) #[257 "\300\301\"\207" [slot-value sentinel] 4 "Access the slot `sentinel' from object of class `rudel-socket-transport'.\n\n(fn THIS)"] rudel-set-sentinel ((this rudel-socket-transport) . #1=(value)) #[514 "\300\301#\207" [eieio-oset sentinel] 7 "Set the slot `sentinel' of an object of class `rudel-socket-transport'.\n\n(fn THIS VALUE)"] rudel-filter ((this rudel-socket-transport)) #[257 "\300\301\"\207" [slot-value filter] 4 "Access the slot `filter' from object of class `rudel-socket-transport'.\n\n(fn THIS)"] rudel-set-filter ((this rudel-socket-transport) . #1#) #[514 "\300\301#\207" [eieio-oset filter] 7 "Set the slot `filter' of an object of class `rudel-socket-transport'.\n\n(fn THIS VALUE)"]] 7) #@79 Create a new object of class type `rudel-socket-transport'. (fn &rest SLOTS) (defalias 'rudel-socket-transport #[128 "\300\301\302#\207" [apply make-instance rudel-socket-transport] 5 (#$ . 2712)]) (byte-code "\300\301\302\303#\300\207" [function-put rudel-socket-transport compiler-macro rudel-socket-transport--anon-cmacro] 4) #@26 (fn WHOLE &rest SLOTS) (defalias 'rudel-socket-transport--anon-cmacro #[385 "\211@;\204\207\300\301\302@@#@\303@DABB\"\207" [macroexp--warn-and-return format "Obsolete name arg %S to constructor %S" identity] 7 (#$ . 3049)]) (byte-code "\300\301\302\303\304\305%\210\300\306\304\307\304\310%\210\300\311\304\312\304\313%\210\300\314\304\315\304\316%\210\317\320\321\322!\"\210\317\323\324\322!\"\210\317\325\323\"\210\326\325\327\330#\210\331\322\332\323#\333\322\334\335\336$\210\300\337\304\340\304\341%\207" [cl-generic-define-method initialize-instance (:after) ((this rudel-socket-transport) _slots) nil #[514 "\300\301\302\"\303\304\305\306\307 !\310\"\311\312%\"\210\313\301\302\"\303\304\314\306\307 !\315\"\316\317%\"\207" [set-process-filter slot-value socket make-byte-code 514 "\300\301\302\"\205\301\302\"!\207" vconcat vector [slot-value filter] 6 "\n\n(fn PROCESS DATA)" set-process-sentinel "\300\301\302\"\205!\303!\211\304=\206\211\305>??\205\301\302\"\306!\262\207" [slot-value sentinel process-status run (finished exit failed closed) close] 7 "\n\n(fn PROCESS MESSAGE)"] 11 "Install process filter and sentinel for THIS.\n\n(fn THIS SLOTS)"] rudel-send ((this rudel-socket-transport) data) #[514 "\300\301\302\"\"\207" [process-send-string slot-value socket] 7 "Send DATA through THIS.\n\n(fn THIS DATA)"] rudel-close ((this rudel-socket-transport)) #[257 "\211\300\301\302\"!\207" [delete-process slot-value socket] 6 "Close THIS.\n\n(fn THIS)"] rudel-start ((this rudel-socket-transport)) #[257 "\211\300\301\302\"!\207" [continue-process slot-value socket] 6 "Start THIS after it has been suspended.\n\n(fn THIS)"] defalias rudel-socket-listener-p eieio-make-class-predicate rudel-socket-listener rudel-socket-listener--eieio-childp eieio-make-child-predicate rudel-socket-listener-child-p make-obsolete "use (cl-typep ... \\='rudel-socket-listener) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (rudel-listener) ((socket :initarg :socket :type (or null process) :initform nil :documentation "The server socket represented by this listener\nobject.") (dispatch :initarg :dispatch :type (or null function) :writer rudel-set-dispatcher :documentation "Function called for incoming connections.\nThe dispatch function has to accept a single argument which will\nbe a transport object representing the incoming connection.")) (:documentation "") rudel-set-dispatcher ((this rudel-socket-listener) value) #[514 "\300\301#\207" [eieio-oset dispatch] 7 "Set the slot `dispatch' of an object of class `rudel-socket-listener'.\n\n(fn THIS VALUE)"]] 7) #@78 Create a new object of class type `rudel-socket-listener'. (fn &rest SLOTS) (defalias 'rudel-socket-listener #[128 "\300\301\302#\207" [apply make-instance rudel-socket-listener] 5 (#$ . 5693)]) (byte-code "\300\301\302\303#\300\207" [function-put rudel-socket-listener compiler-macro rudel-socket-listener--anon-cmacro] 4) #@26 (fn WHOLE &rest SLOTS) (defalias 'rudel-socket-listener--anon-cmacro #[385 "\211@;\204\207\300\301\302@@#@\303@DABB\"\207" [macroexp--warn-and-return format "Obsolete name arg %S to constructor %S" identity] 7 (#$ . 6025)]) (byte-code "\300\301\302\303\302\304%\210\300\305\302\306\302\307%\210\310\311\312\313!\"\210\310\314\315\313!\"\210\310\316\314\"\210\317\316\320\321#\210\322\313\323\314#\324\313\325\326\327$\207" [cl-generic-define-method rudel-close nil ((this rudel-socket-listener)) #[257 "\211\300\301\302\"!\207" [delete-process slot-value socket] 6 "Make THIS stop listening for incoming connections.\n\n(fn THIS)"] rudel-handle-connect ((this rudel-socket-listener) socket) #[514 "\300\301\"\205\302\303\304\305\306\307\"!\"\310#\300\301\"!\262\207" [slot-value dispatch rudel-socket-transport format "TCP from %s" format-network-address process-contact :remote :socket] 10 "Handle incoming connection SOCKET.\n\n(fn THIS SOCKET)"] defalias rudel-tcp-backend-p eieio-make-class-predicate rudel-tcp-backend rudel-tcp-backend--eieio-childp eieio-make-child-predicate rudel-tcp-backend-child-p make-obsolete "use (cl-typep ... \\='rudel-tcp-backend) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (rudel-transport-backend) ((capabilities :initform (listen connect))) (:documentation "TCP transport backend.\nThe transport backend is a factory for TCP transport objects.")] 6) #@74 Create a new object of class type `rudel-tcp-backend'. (fn &rest SLOTS) (defalias 'rudel-tcp-backend #[128 "\300\301\302#\207" [apply make-instance rudel-tcp-backend] 5 (#$ . 7475)]) (byte-code "\300\301\302\303#\300\207" [function-put rudel-tcp-backend compiler-macro rudel-tcp-backend--anon-cmacro] 4) #@26 (fn WHOLE &rest SLOTS) (defalias 'rudel-tcp-backend--anon-cmacro #[385 "\211@;\204\207\300\301\302@@#@\303@DABB\"\207" [macroexp--warn-and-return format "Obsolete name arg %S to constructor %S" identity] 7 (#$ . 7787)]) (cl-generic-define-method 'initialize-instance nil '((this rudel-tcp-backend) _slots) t #[771 " \210\301\302#\207" [rudel-tcp-version eieio-oset :version] 7 "Initialize slots and set version of THIS.\n\n(fn CL--CNM THIS SLOTS)"]) #@66 History of hosts read by TCP backend's `rudel-ask-connect-info'. (defvar rudel-tcp-ask-connect-info-host-history nil (#$ . 8256)) #@59 Last port read by TCP backend's `rudel-ask-connect-info'. (defvar rudel-tcp-ask-connect-info-port-last nil (#$ . 8392)) (byte-code "\300\301\302\303\302\304%\210\300\305\302\306\302\307%\210\300\310\302\311\302\312%\210\313\314\315!\316\317#\210\320\321!\207" [cl-generic-define-method rudel-ask-connect-info nil ((_this rudel-tcp-backend) &optional info) #[513 "\302\303\"\206\304@\203\305\306@\"\202\307\310\300@$\302\311\"\206(\312\313 \"\211\314\303\311F\"\207" [rudel-tcp-ask-connect-info-host-history rudel-tcp-ask-connect-info-port-last plist-get :host read-string format "Server (default %s): " "Server: " nil :port read-number "Port: " append] 9 "Augment INFO by read a hostname and a port number.\n\n(fn THIS &optional INFO)"] rudel-make-connection ((this rudel-tcp-backend) info info-callback &optional _progress-callback) #[1027 "C\300\301\302\303\304\305!\306\"\307\310%\311\"\204\211\242\"\240\210\312\242\313\"\312\242\314\"\315\316\317\320\"\313\321\322\323\324\323&\n\325\317\326#\327#\266\203\207" [cl-every make-byte-code 257 "\211\300\242\235\207" vconcat vector #1=[] 3 "\n\n(fn KEYWORD)" (:host :port) plist-get :host :port make-network-process :name format "TCP to %s" :service :stop t :noquery rudel-socket-transport "to %s:%s" :socket] 18 "Connect to a TCP server using the information in INFO.\nINFO has to be a property list containing the keys :host\nand :port.\n\n(fn THIS INFO INFO-CALLBACK &optional PROGRESS-CALLBACK)"] rudel-wait-for-connections ((this rudel-tcp-backend) info info-callback) #[771 "C\300\301\302\303\304\305!\306\"\307\310%\311\"\204\211\242\"\240\210\312\242\313\"\312\242\314\"\315\316\317\206/\320#!\321\322\323\316\324\"\325\326\327\330\327\331\332\333\332\334\301\335\336\304\305!\337\"\340\341%\205\\\342D&\343\344#\210\266\204\207" [cl-every make-byte-code 257 "\211\300\242\235\207" vconcat vector #1# 3 "\n\n(fn KEYWORD)" (:port) plist-get :address :port rudel-socket-listener format "on %s:%s" "*" apply make-network-process :name "TCP on %s" :service :server t :noquery :filter ignore :sentinel :log 771 "\301\300\"\207" [rudel-handle-connect] 6 "\n\n(fn SERVER SOCKET MESSAGE)" :host eieio-oset :socket] 28 "Create TCP server according to INFO.\nINFO has to be a property list containing the key :port.\n\n(fn THIS INFO INFO-CALLBACK)"] rudel-add-backend rudel-backend-get-factory transport tcp rudel-tcp-backend provide rudel-socket] 6)