]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/civetweb/src/third_party/duktape-1.3.0/examples/eventloop/client-socket-test.js
import 12.2.13 release
[ceph.git] / ceph / src / civetweb / src / third_party / duktape-1.3.0 / examples / eventloop / client-socket-test.js
diff --git a/ceph/src/civetweb/src/third_party/duktape-1.3.0/examples/eventloop/client-socket-test.js b/ceph/src/civetweb/src/third_party/duktape-1.3.0/examples/eventloop/client-socket-test.js
deleted file mode 100644 (file)
index ff87784..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-
-var HOST = 'localhost';
-var PORT = 80;
-var EXIT_TIMEOUT = 300e3;
-
-print('automatic exit after ' + (EXIT_TIMEOUT / 1e3) + ' seconds');
-setTimeout(function () {
-    print('exit timer');
-    EventLoop.requestExit();
-}, EXIT_TIMEOUT);
-
-EventLoop.connect(HOST, PORT, function (fd) {
-    print('connected to ' + HOST + ':' + PORT + ', fd', fd);
-    EventLoop.setReader(fd, function (fd, data) {
-        print('read from fd', fd);
-        print(data);
-        EventLoop.close(fd);
-    });
-    EventLoop.write(fd, "GET / HTTP/1.1\r\n" +
-                        "Host: " + HOST + "\r\n" +
-                        "User-Agent: client-socket-test.js\r\n" +
-                        "\r\n");
-});
-