]> git.proxmox.com Git - mirror_edk2.git/blobdiff - AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/echosvr.py
edk2: Remove AppPkg, StdLib, StdLibPrivateInternalFiles
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.2 / Demo / sockets / echosvr.py
diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/echosvr.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/echosvr.py
deleted file mode 100644 (file)
index 893a486..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#! /usr/bin/env python\r
-\r
-# Python implementation of an 'echo' tcp server: echo all data it receives.\r
-#\r
-# This is the simplest possible server, servicing a single request only.\r
-\r
-import sys\r
-from socket import *\r
-\r
-# The standard echo port isn't very useful, it requires root permissions!\r
-# ECHO_PORT = 7\r
-ECHO_PORT = 50000 + 7\r
-BUFSIZE = 1024\r
-\r
-def main():\r
-    if len(sys.argv) > 1:\r
-        port = int(eval(sys.argv[1]))\r
-    else:\r
-        port = ECHO_PORT\r
-    s = socket(AF_INET, SOCK_STREAM)\r
-    s.bind(('', port))\r
-    s.listen(1)\r
-    conn, (remotehost, remoteport) = s.accept()\r
-    print 'connected by', remotehost, remoteport\r
-    while 1:\r
-        data = conn.recv(BUFSIZE)\r
-        if not data:\r
-            break\r
-        conn.send(data)\r
-\r
-main()\r