Changeset 13773 for trunk/source/level-1


Ignore:
Timestamp:
Jun 1, 2010, 11:05:16 PM (9 years ago)
Author:
rme
Message:

Now that we have this Unicode thing, it doesn't really work for UDP
sockets to support any format other than :binary.

VERIFY-SOCKET-BUFFER: change misleading error message.

Specialize SOCKET-FORMAT for udp-sockets so that it always returns
:binary.

RECEIVE-FROM: :binary is the only acceptable socket-format.

File:
1 edited

Legend:

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

    r13382 r13773  
    453453(defmethod socket-type ((stream udp-socket)) :datagram)
    454454(defmethod socket-connect ((stream udp-socket)) nil)
     455(defmethod socket-format ((stream udp-socket)) :binary)
    455456
    456457(defgeneric socket-os-fd (socket)
     
    949950            #+x8664-target (and (>= subtype x8664::min-8-bit-ivector-subtag)
    950951                                (<= subtype x8664::max-8-bit-ivector-subtag))
    951       (report-bad-arg buf `(or (array character)
    952                                (array (unsigned-byte 8))
     952      (report-bad-arg buf '(or (array (unsigned-byte 8))
    953953                               (array (signed-byte 8))))))
    954954  (values buf offset))
     
    10101010                                :element-type
    10111011                                (ecase (socket-format socket)
    1012                                   ((:text) 'base-char)
    1013                                   ((:binary :bivalent) '(unsigned-byte 8))))
     1012                                  ((:binary) '(unsigned-byte 8))))
    10141013                vec-offset 0))
    10151014        (%copy-ptr-to-ivector bufptr 0 vec vec-offset ret-size))
Note: See TracChangeset for help on using the changeset viewer.