diff options
| author | Kim F. Storm | 2005-05-15 20:42:43 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2005-05-15 20:42:43 +0000 |
| commit | 149d2fd32c45a5c648d1c33f91736b9cc576f90f (patch) | |
| tree | a40047e202cb1f789356843cb0361ab056d774dd | |
| parent | 294c599c7b43563514e2c115a2287ef2ed7c1510 (diff) | |
| download | emacs-149d2fd32c45a5c648d1c33f91736b9cc576f90f.tar.gz emacs-149d2fd32c45a5c648d1c33f91736b9cc576f90f.zip | |
(open-network-stream-nowait): Remove.
(open-network-stream-server): Remove.
| -rw-r--r-- | lisp/subr.el | 63 |
1 files changed, 6 insertions, 57 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index a894ebcb5ec..8d6c3d6cabf 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -1041,12 +1041,10 @@ This makes or adds to an entry on `after-load-alist'. | |||
| 1041 | FILE should be the name of a library, with no directory name." | 1041 | FILE should be the name of a library, with no directory name." |
| 1042 | (eval-after-load file (read))) | 1042 | (eval-after-load file (read))) |
| 1043 | 1043 | ||
| 1044 | ;;; make-network-process wrappers | 1044 | ;;; open-network-stream is a wrapper around make-network-process. |
| 1045 | 1045 | ||
| 1046 | (if (featurep 'make-network-process) | 1046 | (when (featurep 'make-network-process) |
| 1047 | (progn | 1047 | (defun open-network-stream (name buffer host service) |
| 1048 | |||
| 1049 | (defun open-network-stream (name buffer host service) | ||
| 1050 | "Open a TCP connection for a service to a host. | 1048 | "Open a TCP connection for a service to a host. |
| 1051 | Returns a subprocess-object to represent the connection. | 1049 | Returns a subprocess-object to represent the connection. |
| 1052 | Input and output work as for subprocesses; `delete-process' closes it. | 1050 | Input and output work as for subprocesses; `delete-process' closes it. |
| @@ -1062,56 +1060,7 @@ HOST is name of the host to connect to, or its IP address. | |||
| 1062 | SERVICE is name of the service desired, or an integer specifying | 1060 | SERVICE is name of the service desired, or an integer specifying |
| 1063 | a port number to connect to." | 1061 | a port number to connect to." |
| 1064 | (make-network-process :name name :buffer buffer | 1062 | (make-network-process :name name :buffer buffer |
| 1065 | :host host :service service)) | 1063 | :host host :service service))) |
| 1066 | |||
| 1067 | (defun open-network-stream-nowait (name buffer host service &optional sentinel filter) | ||
| 1068 | "Initiate connection to a TCP connection for a service to a host. | ||
| 1069 | It returns nil if non-blocking connects are not supported; otherwise, | ||
| 1070 | it returns a subprocess-object to represent the connection. | ||
| 1071 | |||
| 1072 | This function is similar to `open-network-stream', except that it | ||
| 1073 | returns before the connection is established. When the connection | ||
| 1074 | is completed, the sentinel function will be called with second arg | ||
| 1075 | matching `open' (if successful) or `failed' (on error). | ||
| 1076 | |||
| 1077 | Args are NAME BUFFER HOST SERVICE SENTINEL FILTER. | ||
| 1078 | NAME, BUFFER, HOST, and SERVICE are as for `open-network-stream'. | ||
| 1079 | Optional args SENTINEL and FILTER specify the sentinel and filter | ||
| 1080 | functions to be used for this network stream." | ||
| 1081 | (if (featurep 'make-network-process '(:nowait t)) | ||
| 1082 | (make-network-process :name name :buffer buffer :nowait t | ||
| 1083 | :host host :service service | ||
| 1084 | :filter filter :sentinel sentinel))) | ||
| 1085 | |||
| 1086 | (defun open-network-stream-server (name buffer service &optional sentinel filter) | ||
| 1087 | "Create a network server process for a TCP service. | ||
| 1088 | It returns nil if server processes are not supported; otherwise, | ||
| 1089 | it returns a subprocess-object to represent the server. | ||
| 1090 | |||
| 1091 | When a client connects to the specified service, a new subprocess | ||
| 1092 | is created to handle the new connection, and the sentinel function | ||
| 1093 | is called for the new process. | ||
| 1094 | |||
| 1095 | Args are NAME BUFFER SERVICE SENTINEL FILTER. | ||
| 1096 | NAME is name for the server process. Client processes are named by | ||
| 1097 | appending the ip-address and port number of the client to NAME. | ||
| 1098 | BUFFER is the buffer (or buffer name) to associate with the server | ||
| 1099 | process. Client processes will not get a buffer if a process filter | ||
| 1100 | is specified or BUFFER is nil; otherwise, a new buffer is created for | ||
| 1101 | the client process. The name is similar to the process name. | ||
| 1102 | Third arg SERVICE is name of the service desired, or an integer | ||
| 1103 | specifying a port number to connect to. It may also be t to select | ||
| 1104 | an unused port number for the server. | ||
| 1105 | Optional args SENTINEL and FILTER specify the sentinel and filter | ||
| 1106 | functions to be used for the client processes; the server process | ||
| 1107 | does not use these function." | ||
| 1108 | (if (featurep 'make-network-process '(:server t)) | ||
| 1109 | (make-network-process :name name :buffer buffer | ||
| 1110 | :service service :server t :noquery t | ||
| 1111 | :sentinel sentinel :filter filter))) | ||
| 1112 | |||
| 1113 | )) ;; (featurep 'make-network-process) | ||
| 1114 | |||
| 1115 | 1064 | ||
| 1116 | ;; compatibility | 1065 | ;; compatibility |
| 1117 | 1066 | ||
| @@ -2363,7 +2312,7 @@ macros." | |||
| 2363 | "Delete from ALIST all elements whose car is `eq' to KEY. | 2312 | "Delete from ALIST all elements whose car is `eq' to KEY. |
| 2364 | Return the modified alist. | 2313 | Return the modified alist. |
| 2365 | Elements of ALIST that are not conses are ignored." | 2314 | Elements of ALIST that are not conses are ignored." |
| 2366 | (while (and (consp (car alist)) | 2315 | (while (and (consp (car alist)) |
| 2367 | (eq (car (car alist)) key)) | 2316 | (eq (car (car alist)) key)) |
| 2368 | (setq alist (cdr alist))) | 2317 | (setq alist (cdr alist))) |
| 2369 | (let ((tail alist) tail-cdr) | 2318 | (let ((tail alist) tail-cdr) |
| @@ -2378,7 +2327,7 @@ Elements of ALIST that are not conses are ignored." | |||
| 2378 | "Delete from ALIST all elements whose cdr is `eq' to VALUE. | 2327 | "Delete from ALIST all elements whose cdr is `eq' to VALUE. |
| 2379 | Return the modified alist. | 2328 | Return the modified alist. |
| 2380 | Elements of ALIST that are not conses are ignored." | 2329 | Elements of ALIST that are not conses are ignored." |
| 2381 | (while (and (consp (car alist)) | 2330 | (while (and (consp (car alist)) |
| 2382 | (eq (cdr (car alist)) value)) | 2331 | (eq (cdr (car alist)) value)) |
| 2383 | (setq alist (cdr alist))) | 2332 | (setq alist (cdr alist))) |
| 2384 | (let ((tail alist) tail-cdr) | 2333 | (let ((tail alist) tail-cdr) |