aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim F. Storm2005-05-15 20:42:43 +0000
committerKim F. Storm2005-05-15 20:42:43 +0000
commit149d2fd32c45a5c648d1c33f91736b9cc576f90f (patch)
treea40047e202cb1f789356843cb0361ab056d774dd
parent294c599c7b43563514e2c115a2287ef2ed7c1510 (diff)
downloademacs-149d2fd32c45a5c648d1c33f91736b9cc576f90f.tar.gz
emacs-149d2fd32c45a5c648d1c33f91736b9cc576f90f.zip
(open-network-stream-nowait): Remove.
(open-network-stream-server): Remove.
-rw-r--r--lisp/subr.el63
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'.
1041FILE should be the name of a library, with no directory name." 1041FILE 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.
1051Returns a subprocess-object to represent the connection. 1049Returns a subprocess-object to represent the connection.
1052Input and output work as for subprocesses; `delete-process' closes it. 1050Input 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.
1062SERVICE is name of the service desired, or an integer specifying 1060SERVICE 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.
1069It returns nil if non-blocking connects are not supported; otherwise,
1070it returns a subprocess-object to represent the connection.
1071
1072This function is similar to `open-network-stream', except that it
1073returns before the connection is established. When the connection
1074is completed, the sentinel function will be called with second arg
1075matching `open' (if successful) or `failed' (on error).
1076
1077Args are NAME BUFFER HOST SERVICE SENTINEL FILTER.
1078NAME, BUFFER, HOST, and SERVICE are as for `open-network-stream'.
1079Optional args SENTINEL and FILTER specify the sentinel and filter
1080functions 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.
1088It returns nil if server processes are not supported; otherwise,
1089it returns a subprocess-object to represent the server.
1090
1091When a client connects to the specified service, a new subprocess
1092is created to handle the new connection, and the sentinel function
1093is called for the new process.
1094
1095Args are NAME BUFFER SERVICE SENTINEL FILTER.
1096NAME is name for the server process. Client processes are named by
1097 appending the ip-address and port number of the client to NAME.
1098BUFFER 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.
1102Third 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.
1105Optional 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.
2364Return the modified alist. 2313Return the modified alist.
2365Elements of ALIST that are not conses are ignored." 2314Elements 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.
2379Return the modified alist. 2328Return the modified alist.
2380Elements of ALIST that are not conses are ignored." 2329Elements 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)