fixing SMTP for encodings (is ASCII appropriate?)
parent
52f04dcfa4
commit
d0e0a12cb0
|
@ -1,5 +1,8 @@
|
||||||
! Copyright (C) 2007 Elie CHAFTARI
|
! Copyright (C) 2007 Elie CHAFTARI
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
|
USING: combinators kernel prettyprint io io.timeouts io.server
|
||||||
|
sequences namespaces io.sockets continuations calendar io.encodings.ascii ;
|
||||||
|
IN: smtp.server
|
||||||
|
|
||||||
! Mock SMTP server for testing purposes.
|
! Mock SMTP server for testing purposes.
|
||||||
|
|
||||||
|
@ -27,10 +30,6 @@
|
||||||
! bye
|
! bye
|
||||||
! Connection closed by foreign host.
|
! Connection closed by foreign host.
|
||||||
|
|
||||||
USING: combinators kernel prettyprint io io.timeouts io.server
|
|
||||||
sequences namespaces io.sockets continuations calendar ;
|
|
||||||
IN: smtp.server
|
|
||||||
|
|
||||||
SYMBOL: data-mode
|
SYMBOL: data-mode
|
||||||
|
|
||||||
: process ( -- )
|
: process ( -- )
|
||||||
|
@ -64,7 +63,7 @@ SYMBOL: data-mode
|
||||||
|
|
||||||
: smtp-server ( port -- )
|
: smtp-server ( port -- )
|
||||||
"Starting SMTP server on port " write dup . flush
|
"Starting SMTP server on port " write dup . flush
|
||||||
"127.0.0.1" swap <inet4> <server> [
|
"127.0.0.1" swap <inet4> ascii <server> [
|
||||||
accept [
|
accept [
|
||||||
1 minutes stdio get set-timeout
|
1 minutes stdio get set-timeout
|
||||||
"220 hello\r\n" write flush
|
"220 hello\r\n" write flush
|
||||||
|
|
Loading…
Reference in New Issue