Changeset 40407 in project


Ignore:
Timestamp:
08/31/21 13:44:48 (3 weeks ago)
Author:
Vasilij Schneidermann
Message:

(chicken tcp): Correct imports

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/man/5/Module (chicken tcp)

    r35529 r40407  
    187187
    188188<enscript highlight=scheme>
    189  ; client.scm
    190  (declare (uses tcp))
    191  (define-values (i o) (tcp-connect "localhost" 4242))
    192  (write-line "Good Bye!" o)
    193  (print (read-line i))
     189; client.scm
     190(import (chicken io) (chicken tcp))
     191(define-values (i o) (tcp-connect "localhost" 4242))
     192(write-line "Good Bye!" o)
     193(print (read-line i))
    194194</enscript>
    195195
    196196<enscript highlight=scheme>
    197  ; server.scm
    198  (declare (uses tcp))
    199  (define l (tcp-listen 4242))
    200  (define-values (i o) (tcp-accept l))
    201  (write-line "Hello!" o)
    202  (print (read-line i))
    203  (close-input-port i)
    204  (close-output-port o)
     197; server.scm
     198(import (chicken io) (chicken tcp))
     199(define l (tcp-listen 4242))
     200(define-values (i o) (tcp-accept l))
     201(write-line "Hello!" o)
     202(print (read-line i))
     203(close-input-port i)
     204(close-output-port o)
    205205</enscript>
    206206
Note: See TracChangeset for help on using the changeset viewer.