Skip to content

Commit

Permalink
Fix web socket example to take a scoped WebSocket.
Browse files Browse the repository at this point in the history
  • Loading branch information
s-ludwig committed Oct 4, 2015
1 parent c23b19c commit a233dfb
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions examples/web_websocket/source/app.d
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ import core.time;
import std.conv : to;

class WebsocketService {

@path("/") void getHome()
{
render!("index.dt");
}

@path("/ws") void getWebsocket(WebSocket socket){
@path("/ws") void getWebsocket(scope WebSocket socket){
int counter = 0;
logInfo("Got new web socket connection.");
while (true) {
Expand All @@ -31,8 +30,6 @@ class WebsocketService {
}
logInfo("Client disconnected.");
}


}


Expand Down

0 comments on commit a233dfb

Please sign in to comment.