Ignore:
Timestamp:
Feb 14, 2008, 9:06:16 AM (12 years ago)
Author:
gb
Message:

Lose the :SEND-TIMEOUT/:RECEIVE-TIMEOUT args; handling of timeous on
I/O operations should now be more general.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-1/l1-sockets.lisp

    r8385 r8485  
    533533                           connect
    534534                           out-of-band-inline
    535                            receive-timeout
    536                            send-timeout
    537535                           &allow-other-keys)
    538536  ;; see man socket(7) tcp(7) ip(7)
     
    562560                        #+(or freebsd-target darwin-target) #$IPPROTO_TCP
    563561                        #$TCP_NODELAY 1))
    564       (when (and receive-timeout (> receive-timeout 0))
    565         (timeval-setsockopt fd
    566                             #$SOL_SOCKET
    567                             #$SO_RCVTIMEO
    568                             receive-timeout))
    569       (when (and send-timeout (> send-timeout 0))
    570         (timeval-setsockopt fd
    571                             #$SOL_SOCKET
    572                             #$SO_SNDTIMEO
    573                             send-timeout))
    574562      (when (or local-port local-host)
    575563        (let* ((proto (if (eq type :stream) "tcp" "udp"))
     
    617605                    local-filename remote-filename sharing basic
    618606                    external-format (auto-close t)
    619                     receive-timeout send-timeout connect-timeout)
     607                    connect-timeout)
    620608  "Create and return a new socket."
    621609  (declare (dynamic-extent keys))
     
    624612                   local-port local-host backlog class out-of-band-inline
    625613                   local-filename remote-filename sharing basic external-format
    626                    auto-close receive-timeout send-timeout connect-timeout))
     614                   auto-close connect-timeout))
    627615  (ecase address-family
    628616    ((:file) (apply #'make-file-socket keys))
     
    710698
    711699
    712 (defun make-tcp-stream (fd &key (format :bivalent) external-format (class 'tcp-stream) sharing (basic t) (auto-close t) (receive-timeout 0) &allow-other-keys)
     700(defun make-tcp-stream (fd &key (format :bivalent) external-format (class 'tcp-stream) sharing (basic t) (auto-close t) &allow-other-keys)
    713701  (let* ((external-format (normalize-external-format :socket external-format)))
    714702    (let ((element-type (ecase format
     
    726714                      :line-termination (external-format-line-termination external-format)
    727715                      :basic basic
    728                       :auto-close auto-close
    729                       :interactive (zerop receive-timeout)))))
     716                      :auto-close auto-close))))
    730717
    731718(defun make-file-socket-stream (fd &key (format :bivalent) external-format (class 'file-socket-stream)  sharing basic (auto-close t) &allow-other-keys)
Note: See TracChangeset for help on using the changeset viewer.