refactor: changes spaces and instructions
use if, remove useless begin, 1 tab = 4 spaces
This commit is contained in:
parent
48c95a8370
commit
d8e1e49e58
1 changed files with 14 additions and 17 deletions
11
server.scm
11
server.scm
|
@ -18,7 +18,7 @@
|
||||||
(use-modules (ice-9 binary-ports) (ice-9 iconv) (rnrs bytevectors))
|
(use-modules (ice-9 binary-ports) (ice-9 iconv) (rnrs bytevectors))
|
||||||
|
|
||||||
(define chaussette (socket PF_INET SOCK_STREAM 0))
|
(define chaussette (socket PF_INET SOCK_STREAM 0))
|
||||||
(bind chaussette AF_INET INADDR_ANY 8082)
|
(bind chaussette AF_INET INADDR_ANY 8081)
|
||||||
(listen chaussette 1)
|
(listen chaussette 1)
|
||||||
(display "Chaussette en place")
|
(display "Chaussette en place")
|
||||||
(newline)
|
(newline)
|
||||||
|
@ -33,13 +33,10 @@
|
||||||
(string #\return #\nl)))
|
(string #\return #\nl)))
|
||||||
|
|
||||||
;; si ya pas de \cr\nl, buffer trop grand ou mal formaté
|
;; si ya pas de \cr\nl, buffer trop grand ou mal formaté
|
||||||
(when (not pos) (begin
|
(if (not pos)
|
||||||
(display (string-append "59 Bad Request" (string #\return #\nl)) out))
|
(display (string-append "59 Bad Request" (string #\return #\nl)) out)
|
||||||
)
|
|
||||||
|
|
||||||
(unless (not pos) (begin
|
|
||||||
(display "all ok")
|
(display "all ok")
|
||||||
))
|
)
|
||||||
|
|
||||||
(shutdown out 2)
|
(shutdown out 2)
|
||||||
)))
|
)))
|
||||||
|
|
Loading…
Reference in a new issue