Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2014-04-10 15:06:18 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c3c2767363f5a341cce75b53f584d4ab98f25c0a
c3c27673
1 parent
8295169e
update api server, add servers
显示空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
31 行增加
和
0 行删除
trunk/research/api-server/server.py
trunk/research/api-server/server.py
查看文件 @
c3c2767
...
...
@@ -320,6 +320,36 @@ class RESTSessions(object):
return
code
'''
the server list
'''
class
RESTServers
(
object
):
exposed
=
True
def
__init__
(
self
):
self
.
__server_ip
=
"192.168.1.142"
;
def
GET
(
self
):
enable_crossdomain
()
url
=
"http://
%
s:8080/live/livestream.html"
%
(
self
.
__server_ip
)
raise
cherrypy
.
HTTPRedirect
(
url
)
def
POST
(
self
):
enable_crossdomain
()
raise
cherrypy
.
HTTPError
(
405
,
"Not allowed."
)
def
DELETE
(
self
,
id
):
enable_crossdomain
()
raise
cherrypy
.
HTTPError
(
405
,
"Not allowed."
)
def
PUT
(
self
,
id
):
enable_crossdomain
()
raise
cherrypy
.
HTTPError
(
405
,
"Not allowed."
)
def
OPTIONS
(
self
,
id
=
None
):
enable_crossdomain
()
global_chat_id
=
os
.
getpid
();
'''
the chat streams, public chat room.
...
...
@@ -453,6 +483,7 @@ class V1(object):
self
.
streams
=
RESTStreams
()
self
.
sessions
=
RESTSessions
()
self
.
chats
=
RESTChats
()
self
.
servers
=
RESTServers
()
'''
main code start.
...
...
请
注册
或
登录
后发表评论