The Racket repository
Go to file
David Van Horn 333e0aa070 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:

(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)))
2014-05-04 18:55:31 -04:00
native-pkgs@8988164a6e win64: fix longdouble DLL 2014-04-27 16:51:23 -06:00
pkgs Universe and world take an optional 'port' argument. 2014-05-04 18:55:31 -04:00
racket fix random generation environment usage 2014-05-04 14:34:55 -05:00
.gitattributes Don't include git files in archives. 2010-05-12 01:46:05 -04:00
.gitignore Add add-on to .gitignore. 2013-07-04 11:51:53 -04:00
.gitmodules access "native-pkgs" as a git submodule 2013-07-26 22:36:20 -06:00
.mailmap mailmap updates & fixes. 2013-04-03 18:10:22 -04:00
.travis.yml fix net tests on travis 2013-10-15 22:06:59 -04:00
INSTALL.txt Makefile: refine support for building an installer from a site 2014-03-11 08:10:35 -06:00
Makefile distro-build: fix Windows client setup 2014-05-04 08:53:10 -06:00
README.txt 2013 -> 2014 2014-01-21 15:02:21 -05:00

This is the source code for the main Racket distribution.  See
"INSTALL.txt" for information on building Racket.

License
-------

Racket
Copyright (c) 2010-2014 PLT Design Inc.

Racket is distributed under the GNU Lesser General Public License
(LGPL).  This means that you can link Racket into proprietary
applications, provided you follow the rules stated in the LGPL.  You can
also modify Racket; if you distribute a modified version, you must
distribute it under the terms of the LGPL, which in particular means
that you must release the source code for the modified software.  See
racket/src/COPYING_LESSER.txt for more information.