File tree Expand file tree Collapse file tree 3 files changed +9
-11
lines changed
appengine/flexible/websockets Expand file tree Collapse file tree 3 files changed +9
-11
lines changed Original file line number Diff line number Diff line change 1
- # Copyright 2017 Google Inc.
1
+ # Copyright 2018 Google LLC
2
2
#
3
3
# Licensed under the Apache License, Version 2.0 (the "License");
4
4
# you may not use this file except in compliance with the License.
14
14
15
15
from __future__ import print_function
16
16
17
- # [START app ]
17
+ # [START gae_flex_websockets_app ]
18
18
from flask import Flask , render_template
19
19
from flask_sockets import Sockets
20
20
@@ -35,7 +35,7 @@ def chat_socket(ws):
35
35
clients = ws .handler .server .clients .values ()
36
36
for client in clients :
37
37
client .ws .send (message )
38
- # [END app ]
38
+ # [END gae_flex_websockets_app ]
39
39
40
40
41
41
@app .route ('/' )
Original file line number Diff line number Diff line change 1
- # Copyright 2017 Google Inc.
1
+ # Copyright 2018 Google LLC
2
2
#
3
3
# Licensed under the Apache License, Version 2.0 (the "License");
4
4
# you may not use this file except in compliance with the License.
Original file line number Diff line number Diff line change 1
1
{#
2
- # Copyright 2015 Google Inc.
2
+ # Copyright 2018 Google LLC
3
3
#
4
4
# Licensed under the Apache License, Version 2.0 (the "License");
5
5
# you may not use this file except in compliance with the License.
13
13
# See the License for the specific language governing permissions and
14
14
# limitations under the License.
15
15
#}
16
- {# [START index] #}
17
16
<!doctype html>
18
17
< html >
19
18
< head >
22
21
</ head >
23
22
< body >
24
23
25
- <!-- [START form ] -->
24
+ <!-- [START gae_flex_websockets_form ] -->
26
25
< p > Chat demo</ p >
27
26
< form id ="chat-form ">
28
27
< textarea id ="chat-text " placeholder ="Enter some text... "> </ textarea >
38
37
< p > Status:</ p >
39
38
< ul id ="chat-status "> </ ul >
40
39
</ div >
41
- <!-- [END form ] -->
40
+ <!-- [END gae_flex_websockets_form ] -->
42
41
43
42
< script src ="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js "> </ script >
44
43
< script >
45
- // [START js ]
44
+ // [START gae_flex_websockets_js ]
46
45
$ ( function ( ) {
47
46
/* If the main page is served via https, the WebSocket must be served via
48
47
"wss" (WebSocket Secure) */
91
90
websocket . send ( data ) ;
92
91
} ) ;
93
92
} ) ;
94
- // [END js ]
93
+ // [END gae_flex_websockets_js ]
95
94
</ script >
96
95
</ body >
97
96
</ html >
98
- {# [END index] #}
You can’t perform that action at this time.
0 commit comments