initial commit
This commit is contained in:
50
third_party/libhv/html/EventSource.html
vendored
Executable file
50
third_party/libhv/html/EventSource.html
vendored
Executable file
@@ -0,0 +1,50 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>EventSource客户端</title>
|
||||
|
||||
<script type="text/javascript">
|
||||
function EventSourceTest(url)
|
||||
{
|
||||
if (typeof(EventSource) !== "undefined")
|
||||
{
|
||||
var es = new EventSource(url);
|
||||
|
||||
es.onopen = function()
|
||||
{
|
||||
alert("连接已建立");
|
||||
};
|
||||
|
||||
es.onmessage = function(ev)
|
||||
{
|
||||
console.log("received event: " + ev.data);
|
||||
var li=document.createElement("li");
|
||||
li.innerHTML=ev.data;
|
||||
document.getElementById("msg_list").appendChild(li);
|
||||
};
|
||||
|
||||
es.onerror = function(e)
|
||||
{
|
||||
alert("连接断开");
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("您的浏览器不支持 EventSource!");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
URL: <input type="text" id="url" value="http://127.0.0.1:8080/sse" style="width:300px;">
|
||||
<button onclick="EventSourceTest(document.getElementById('url').value)">运行 EventSource</button>
|
||||
<div>
|
||||
<ul id="msg_list" style="height:500px;overflow-y:scroll;">
|
||||
</ul>
|
||||
<div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
53
third_party/libhv/html/WebSocket.html
vendored
Executable file
53
third_party/libhv/html/WebSocket.html
vendored
Executable file
@@ -0,0 +1,53 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>WebSocket客户端</title>
|
||||
|
||||
<script type="text/javascript">
|
||||
function WebSocketTest(url)
|
||||
{
|
||||
if ("WebSocket" in window)
|
||||
{
|
||||
// 打开一个 web socket
|
||||
var ws = new WebSocket(url);
|
||||
|
||||
ws.onopen = function()
|
||||
{
|
||||
alert("连接已建立");
|
||||
ws.send("hello");
|
||||
};
|
||||
|
||||
ws.onmessage = function(ev)
|
||||
{
|
||||
var received_msg = ev.data;
|
||||
console.log("received websocket message: " + received_msg);
|
||||
var li=document.createElement("li");
|
||||
li.innerHTML=received_msg;
|
||||
document.getElementById("msg_list").appendChild(li);
|
||||
};
|
||||
|
||||
ws.onclose = function()
|
||||
{
|
||||
alert("连接已关闭");
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("您的浏览器不支持 WebSocket!");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
URL: <input type="text" id="url" value="ws://127.0.0.1:9999/test" style="width:300px;">
|
||||
<button onclick="WebSocketTest(document.getElementById('url').value)">运行 WebSocket</button>
|
||||
<div>
|
||||
<ul id="msg_list" style="height:500px;overflow-y:scroll;">
|
||||
</ul>
|
||||
<div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
BIN
third_party/libhv/html/downloads/libhv-vs-nginx.png
vendored
Executable file
BIN
third_party/libhv/html/downloads/libhv-vs-nginx.png
vendored
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 211 KiB |
10
third_party/libhv/html/downloads/中文.html
vendored
Executable file
10
third_party/libhv/html/downloads/中文.html
vendored
Executable file
@@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>中文测试</title>
|
||||
</head>
|
||||
<body>
|
||||
<center><h1> 欢迎使用 <a href="https://github.com/ithewei/libhv.git">libhv</a> </h1></center>
|
||||
</body>
|
||||
</html>
|
||||
12
third_party/libhv/html/error.html
vendored
Executable file
12
third_party/libhv/html/error.html
vendored
Executable file
@@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Error</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>An error occurred.</h1>
|
||||
<p>Sorry, the page you are looking for is currently unavailable.<br/>Please try again later.</p>
|
||||
<p>If you are the system administrator of this resource then you should check the error log for details.</p>
|
||||
<p><em>Faithfully yours, httpd.</em></p>
|
||||
</body>
|
||||
</html>
|
||||
9
third_party/libhv/html/index.html
vendored
Executable file
9
third_party/libhv/html/index.html
vendored
Executable file
@@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>libhv</title>
|
||||
</head>
|
||||
<body>
|
||||
<center><h1> Welcome to <a href="https://github.com/ithewei/libhv.git">libhv</a> </h1></center>
|
||||
</body>
|
||||
</html>
|
||||
1
third_party/libhv/html/uploads/upload.sh
vendored
Executable file
1
third_party/libhv/html/uploads/upload.sh
vendored
Executable file
@@ -0,0 +1 @@
|
||||
bin/curl -v localhost:8080/upload -F "file=@LICENSE"
|
||||
2
third_party/libhv/html/中文路径/中文名称.txt
vendored
Executable file
2
third_party/libhv/html/中文路径/中文名称.txt
vendored
Executable file
@@ -0,0 +1,2 @@
|
||||
http://127.0.0.1:8080/中文路径/中文名称.txt
|
||||
用于Windows中文路径测试
|
||||
Reference in New Issue
Block a user