get-bytevector-n and get-bytevector-n! on socket port hang

Create issue
Issue #109 resolved
Takashi Kato repo owner created an issue

This waits socket input forever:

(import (rnrs) (srfi :106) (srfi :18))

(define server (make-server-socket "5000"))

(define t (make-thread
           (lambda ()
             (let ((s (socket-accept server)))
               (socket-send s #vu8(0 1 2 3 4))))))
(thread-start! t)

(define client (make-client-socket "localhost" "5000"))
(define in (socket-input-port client))
(define buf (make-bytevector 10))

(get-bytevector-n in 10)
(get-bytevector-n! in buf 0 10)

Comments (1)

  1. Log in to comment