comparison lisp/process.el @ 424:11054d720c21 r21-2-20

Import from CVS: tag r21-2-20
author cvs
date Mon, 13 Aug 2007 11:26:11 +0200
parents 697ef44129c6
children
comparison
equal deleted inserted replaced
423:28d9c139be4c 424:11054d720c21
297 with any buffer 297 with any buffer
298 Third arg is program file name. It is searched for as in the shell. 298 Third arg is program file name. It is searched for as in the shell.
299 Remaining arguments are strings to give program as arguments." 299 Remaining arguments are strings to give program as arguments."
300 (apply 'start-process-internal name buffer program program-args)) 300 (apply 'start-process-internal name buffer program program-args))
301 301
302 (defun open-network-stream (name buffer host service) 302 (defun open-network-stream (name buffer host service &optional protocol)
303 "Open a TCP connection for a service to a host. 303 "Open a TCP connection for a service to a host.
304 Returns a subprocess-object to represent the connection. 304 Returns a subprocess-object to represent the connection.
305 Input and output work as for subprocesses; `delete-process' closes it. 305 Input and output work as for subprocesses; `delete-process' closes it.
306 Args are NAME BUFFER HOST SERVICE. 306 Args are NAME BUFFER HOST SERVICE.
307 NAME is name for process. It is modified if necessary to make it unique. 307 NAME is name for process. It is modified if necessary to make it unique.
310 an output stream or filter function to handle the output. 310 an output stream or filter function to handle the output.
311 BUFFER may be also nil, meaning that this process is not associated 311 BUFFER may be also nil, meaning that this process is not associated
312 with any buffer 312 with any buffer
313 Third arg is name of the host to connect to, or its IP address. 313 Third arg is name of the host to connect to, or its IP address.
314 Fourth arg SERVICE is name of the service desired, or an integer 314 Fourth arg SERVICE is name of the service desired, or an integer
315 specifying a port number to connect to." 315 specifying a port number to connect to.
316 (open-network-stream-internal name buffer host service)) 316 Fifth argument PROTOCOL is a network protocol. Currently 'tcp
317 (Transmission Control Protocol) and 'udp (User Datagram Protocol) are
318 supported. When omitted, 'tcp is assumed.
319
320 Ouput via `process-send-string' and input via buffer or filter (see
321 `set-process-filter') are stream-oriented. That means UDP datagrams are
322 not guaranteed to be sent and received in discrete packets. (But small
323 datagrams around 500 bytes that are not truncated by `process-send-string'
324 are usually fine.) Note further that UDP protocol does not guard against
325 lost packets."
326 (open-network-stream-internal name buffer host service protocol))
317 327
318 (defun shell-quote-argument (argument) 328 (defun shell-quote-argument (argument)
319 "Quote an argument for passing as argument to an inferior shell." 329 "Quote an argument for passing as argument to an inferior shell."
320 (if (eq system-type 'ms-dos) 330 (if (eq system-type 'ms-dos)
321 ;; MS-DOS shells don't have quoting, so don't do any. 331 ;; MS-DOS shells don't have quoting, so don't do any.