aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/websocket.rs
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2015-05-23 19:49:53 -0400
committerCorey Farwell <coreyf@rwell.org>2015-05-24 00:01:49 -0400
commit8e3f4bba85b9b246fb7da8ea0994fb0160578c1b (patch)
tree2c66c695c97d638df81aeb40ac54ccc6d0cc8cb9 /components/script/dom/websocket.rs
parent7561f7b83f27811683c1e724d75a935573a72813 (diff)
downloadservo-8e3f4bba85b9b246fb7da8ea0994fb0160578c1b.tar.gz
servo-8e3f4bba85b9b246fb7da8ea0994fb0160578c1b.zip
Reduce max line length from 150 to 120 characters
Part of https://github.com/servo/servo/issues/6041
Diffstat (limited to 'components/script/dom/websocket.rs')
-rw-r--r--components/script/dom/websocket.rs15
1 files changed, 10 insertions, 5 deletions
diff --git a/components/script/dom/websocket.rs b/components/script/dom/websocket.rs
index e902d1ac034..79365539055 100644
--- a/components/script/dom/websocket.rs
+++ b/components/script/dom/websocket.rs
@@ -162,7 +162,8 @@ impl WebSocket {
//Create everything necessary for starting the open asynchronous task, then begin the task.
let global_root = ws_root.global.root();
- let addr: Trusted<WebSocket> = Trusted::new(global_root.r().get_cx(), ws_root, global_root.r().script_chan().clone());
+ let addr: Trusted<WebSocket> =
+ Trusted::new(global_root.r().get_cx(), ws_root, global_root.r().script_chan().clone());
let open_task = box WebSocketTaskHandler::new(addr.clone(), WebSocketTask::Open);
global_root.r().script_chan().send(ScriptMsg::RunnableMsg(open_task)).unwrap();
//TODO: Spawn thread here for receive loop
@@ -200,7 +201,8 @@ impl<'a> WebSocketMethods for JSRef<'a, WebSocket> {
}
fn Send(self, data: Option<USVString>)-> Fallible<()>{
- /*TODO: This is not up to spec see http://html.spec.whatwg.org/multipage/comms.html search for "If argument is a string"
+ /*TODO: This is not up to spec see http://html.spec.whatwg.org/multipage/comms.html search for
+ "If argument is a string"
TODO: Need to buffer data
TODO: bufferedAmount attribute returns the size of the buffer in bytes -
this is a required attribute defined in the websocket.webidl file
@@ -240,9 +242,11 @@ impl<'a> WebSocketMethods for JSRef<'a, WebSocket> {
self.failed.set(true);
self.sendCloseFrame.set(true);
//Dispatch send task to send close frame
- //TODO: Sending here is just empty string, though no string is really needed. Another send, empty send, could be used.
+ //TODO: Sending here is just empty string, though no string is really needed. Another send, empty
+ // send, could be used.
let _ = self.Send(None);
- //Note: After sending the close message, the receive loop confirms a close message from the server and must fire a close event
+ //Note: After sending the close message, the receive loop confirms a close message from the server and
+ // must fire a close event
}
WebSocketRequestState::Open => {
//Closing handshake not started - still in open
@@ -257,7 +261,8 @@ impl<'a> WebSocketMethods for JSRef<'a, WebSocket> {
self.sendCloseFrame.set(true);
//Dispatch send task to send close frame
let _ = self.Send(None);
- //Note: After sending the close message, the receive loop confirms a close message from the server and must fire a close event
+ //Note: After sending the close message, the receive loop confirms a close message from the server and
+ // must fire a close event
}
}
Ok(()) //Return Ok