diff --git a/index.bs b/index.bs index 69abfea..a28b324 100644 --- a/index.bs +++ b/index.bs @@ -51,6 +51,8 @@ The connect method is the primary mechanism for creating a [=socket=] instance.
A [=binding object=] in this context is essentially just an object that exposes the a [=connect=] method conformant with this specification. It is anticipated that a runtime may have any number of such objects. This is an area where there is still active discussion on how this should be defined.
+ The binding object defines extra socket `connect` options. The options it contains can modify the behaviour of the `connect` invoked on it. Some of the options it can define: @@ -63,7 +65,7 @@ The binding object is the primary mechanism for runtimes to introduce unique behconst tls_socket = new TLSSocket({ key: '...', cert: '...' }); -tls_socket.connect(); +tls_socket.connect("example.com:1234");Additionally, the binding object does not necessarily have to be an instance of a class, nor does it even have to be JavaScript. It can be any mechanism that exposes the {{connect()}} method. Cloudflare achieves this through [environment bindings](https://developers.cloudflare.com/workers/configuration/bindings/). @@ -145,9 +147,7 @@ The {{readable}} attribute is a {{ReadableStream}} which receives data from the -The ReadableStream operates in non-byte mode, that is the `type` parameter to the -ReadableStream constructor is not set. -This means the stream's controller is {{ReadableStreamDefaultController}}. +The ReadableStream currently is defined to operate in byte mode, that is the `type` parameter to the ReadableStream constructor is set to `'bytes'`. This means the stream's controller is {{ReadableByteStreamDController}}.
Arguably, this should be a type of {{DOMException}} rather than {{TypeError}}. More discussion is necessary on the form and structure of socket-related errors.
+ SocketError is an instance of {{TypeError}}. The error message should start with `"SocketError: "`.