Stopping an instance?

Jimmie Houchin jhouchin at
Thu Feb 20 05:58:49 UTC 2003


I am experimenting with Avi's code for simple http serving. I am trying 
to learn some things.

I haven't found a way to stop the 'listener' so that I could modify the 
code and doit again. I am currently playing with it in a Workspace.

Any help on how to stop the 'listener' would be greatly appreciated.

|output listener rfile fname fdir |
fdir := FileDirectory default fullName.
fname := fdir, '/hello25k.html'.
rfile := FileStream readOnlyFileNamed: fname.
rfile := rfile contentsOfEntireFile.

output _( 'HTTP/1.0 200 OK\Content-Type: text/html\\',rfile contents) 
withCRs withInternetLineEndings.
listener _ ConnectionHandler
           onPort: 8000
           handler: [:s | s getData; sendData: output; closeAndDestroy]
           priority: Processor highIOPriority.
listener start.


Jimmie Houchin

More information about the Squeak-dev mailing list