| Index: sdk/lib/io/websocket.dart
|
| diff --git a/sdk/lib/io/websocket.dart b/sdk/lib/io/websocket.dart
|
| index a35ca3e5eb6852ee9698561b39c463d9e7230d6e..386671da5d4ca2053103cf6fd01cfc3579166bd9 100644
|
| --- a/sdk/lib/io/websocket.dart
|
| +++ b/sdk/lib/io/websocket.dart
|
| @@ -144,13 +144,18 @@ abstract class WebSocket implements Stream, StreamSink {
|
| *
|
| * [protocol] should be the protocol negotiated by this handshake, if any.
|
| *
|
| - * If [serverSide] is `false`, the WebSocket will act as the client and mask
|
| - * the messages it sends. If it's `true`, it will act as the server and will
|
| - * not mask its messages.
|
| + * [serverSide] must be passed explicitly. If it's `false`, the WebSocket will
|
| + * act as the client and mask the messages it sends. If it's `true`, it will
|
| + * act as the server and will not mask its messages.
|
| */
|
| factory WebSocket.fromUpgradedSocket(Socket socket, {String protocol,
|
| - bool serverSide: true}) =>
|
| - new _WebSocketImpl._fromSocket(socket, protocol, serverSide);
|
| + bool serverSide}) {
|
| + if (serverSide == null) {
|
| + throw new ArgumentError("The serverSide argument must be passed "
|
| + "explicitly to WebSocket.fromUpgradedSocket.");
|
| + }
|
| + return new _WebSocketImpl._fromSocket(socket, protocol, serverSide);
|
| + }
|
|
|
| /**
|
| * Returns the current state of the connection.
|
|
|