GitHub PushEvent at 2014-05-02 18:45:59
Repository: racket
Actor: dvanhorn
Payload: {"shas":[["9384d6852412df1e955b2d7110e92708e73cc375","1567d37650a282923bed291400b2be27fd053a0c@ccs.neu.edu","Universe and world take an optional 'port' argument.\n\nAllows universe and world programs to specify which port they want to\ncommunicate on.  If omitted, universe and world use the default port\nnumber.  This enables multiple universe instances to run on the same\nmachine.  For example:\n\n(require 2htdp/universe 2htdp/image)\n\n;; Run two client-server pairs\n(define (run)\n  (launch-many-worlds (server 8080)\n                      (client 8080)\n                      (server 8081)\n                      (client 8081)))\n\n;; Port -> #f\n(define (server p)\n  (define noop (make-bundle #f '() '()))\n  (universe #f\n            (port p)\n            (on-new (λ (_u _iw) noop))\n            (on-msg (λ (_u _iw _msg) noop))))\n\n;; Port -> #f\n(define (client p)\n  (big-bang #f\n            (port p)\n            (on-tick values)\n            (to-draw (λ (_) (empty-scene 400 400)))\n            (register LOCALHOST)))","David Van Horn",true]],"size":1,"ref":"refs/heads/master","head":"9384d6852412df1e955b2d7110e92708e73cc375"}