File: dummy-socket.scm

package info (click to toggle)
scmail 1.3-4.1
  • links: PTS
  • area: main
  • in suites: bullseye, forky, sid, trixie
  • size: 592 kB
  • sloc: lisp: 1,535; sh: 178; makefile: 145
file content (17 lines) | stat: -rw-r--r-- 523 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
(use gauche.net)
;; borrowed from tests/mail.scm
(with-module 
 gauche.net
 (define (smtp-responses)
   (string-join (map number->string 
                     (list 220 250 250 250 354 250 221 ))
                "\n"))

 (define (call-with-client-socket socket proc)
   (call-with-input-string (smtp-responses)
                           (lambda (smtp-port)
                             (proc smtp-port
                                   (standard-output-port)))))

 (define (make-client-socket type host port)
   'dummy))