diff --git a/collects/net/scribblings/websocket.scrbl b/collects/net/scribblings/websocket.scrbl index 825f7742fd..d55cbbd762 100644 --- a/collects/net/scribblings/websocket.scrbl +++ b/collects/net/scribblings/websocket.scrbl @@ -74,6 +74,8 @@ This module also provides the exports from @racketmodname[net/websocket/conn]. @defmodule[net/websocket/conn] +WebSocket connection are synchronizable events. + @defparam[framing-mode mode (symbols 'old 'new)]{ Controls whether framing is as before August 16th, 2010 or after. (Most Web browsers currently support only @racket['old] and they are incompatible, so you must choose the correct one.) Defaults to @racket['old].} @defproc[(ws-conn? [x any/c]) boolean?]{ Returns true if @racket[x] is a WebSocket connection. } diff --git a/collects/net/websocket/conn.rkt b/collects/net/websocket/conn.rkt index ca18d03731..46606fcd16 100644 --- a/collects/net/websocket/conn.rkt +++ b/collects/net/websocket/conn.rkt @@ -3,7 +3,8 @@ (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)) (define (open-ws-conn? x) (and (ws-conn? x) (not (ws-conn-closed? x)))) (provide/contract