plt/racket — pull request #634 by dvanhorn (2014-05-02 18:48:14+00:00)
Title: Universe and world take an optional 'port' argument.

Allows universe and world programs to specify which port they want to
communicate on. If omitted, universe and world use the default port
number. This enables multiple universe instances to run on the same
machine. For example:

```
#lang racket
(require 2htdp/universe 2htdp/image)

;; Run two client-server pairs
(define (run)
(launch-many-worlds (server 8080)
(client 8080)
(server 8081)
(client 8081)))

;; Port -> #f
(define (server p)
(define noop (make-bundle #f '() '()))
(universe #f
(port p)
(on-new (λ (_u _iw) noop))
(on-msg (λ (_u _iw _msg) noop))))

;; Port -> #f
(define (client p)
(big-bang #f
(port p)
(on-tick values)
(to-draw (λ (_) (empty-scene 400 400)))
(register LOCALHOST)))
```