[racket-dev] Synchronizing on WebSocket connections

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Mon Dec 26 16:33:43 EST 2011

I have applied your patch.

On Sat, Dec 24, 2011 at 12:46 PM, Tom McNulty <tom at cetiforge.com> wrote:
> I recently had a need to simultaneously sync on both thread-receive-evt's and incoming data from a web socket connection. To accomplish the latter, a minor change is required to allow ws-conn to act as an event.  Perhaps it can be useful to someone else?
>
> --- a/collects/net/websocket/conn.rkt
> +++ b/collects/net/websocket/conn.rkt
> @@ -3,7 +3,9 @@
>
>  (define framing-mode (make-parameter 'old))
>
> -(struct ws-conn ([closed? #:mutable] line headers ip op))
> +(struct ws-conn ([closed? #:mutable] line headers ip op)
> +         #:property prop:evt (struct-field-index ip))
> +
>
>
>
>
>
>
>
>
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/dev



-- 
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay

"The glory of God is Intelligence" - D&C 93



Posted on the dev mailing list.