This is a small test page."; /* HTML page */
-
-static void serve(int fd) {
- char buf[1024];
- ssize_t buflen;
-
- /* Read the data from the port, blocking if nothing yet there.
- We assume the request (the part we care about) is in one packet */
- buflen = recv(fd, buf, 1024, 0);
-
- /* Ignore all receive errors */
- if (buflen > 0) {
-
- /* Is this an HTTP GET command? (only check the first 5 chars, since
- there are other formats for GET, and we're keeping it very simple)*/
- if (buflen >= 5 &&
- buf[0] == 'G' &&
- buf[1] == 'E' &&
- buf[2] == 'T' &&
- buf[3] == ' ' &&
- buf[4] == '/' ) {
-
- /* Send http header */
- send(fd, http_html_hdr, sizeof(http_html_hdr), 0);
-
- /* Send our HTML page */
- send(fd, http_index_html, sizeof(http_index_html), 0);
- }
- }
-}
-
-
-int main()
-{
- int s;
-
- Genode::log("create new socket ...");
- if((s = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
- Genode::error("no socket available!");
- return -1;
- }
-
- Genode::log("Now, I will bind ...");
- struct sockaddr_in in_addr;
- in_addr.sin_family = AF_INET;
- in_addr.sin_port = htons(80);
- in_addr.sin_addr.s_addr = INADDR_ANY;
- if(bind(s, (struct sockaddr*)&in_addr, sizeof(in_addr))) {
- Genode::error("bind failed!");
- return -1;
- }
-
- Genode::log("Now, I will listen ...");
- if(listen(s, 5)) {
- Genode::error("listen failed!");
- return -1;
- }
-
- Genode::log("Start the server loop ...");
- while(true) {
- struct sockaddr addr;
- socklen_t len = sizeof(addr);
- int client = accept(s, &addr, &len);
- if(client < 0) {
- Genode::warning("invalid socket from accept!");
- continue;
- }
- serve(client);
- close(client);
- }
- return 0;
-}
diff --git a/repos/dde_linux/src/test/lxip/http_srv/target.mk b/repos/dde_linux/src/test/lxip/http_srv/target.mk
deleted file mode 100644
index e339958343..0000000000
--- a/repos/dde_linux/src/test/lxip/http_srv/target.mk
+++ /dev/null
@@ -1,5 +0,0 @@
-TARGET = test-lxip_http_srv
-LIBS = posix libc_lxip
-SRC_CC = main.cc
-
-CC_CXX_WARN_STRICT =
diff --git a/repos/dde_linux/src/test/lxip/udp_echo/main.cc b/repos/dde_linux/src/test/lxip/udp_echo/main.cc
deleted file mode 100644
index f281a7526d..0000000000
--- a/repos/dde_linux/src/test/lxip/udp_echo/main.cc
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * \brief Minimal datagram server demonstration using socket API
- * \author Josef Soentgen
- * \date 2016-04-22
- */
-
-/*
- * Copyright (C) 2016-2017 Genode Labs GmbH
- *
- * This file is part of the Genode OS framework, which is distributed
- * under the terms of the GNU Affero General Public License version 3.
- */
-
-/* Genode includes */
-#include