]> git.proxmox.com Git - mirror_edk2.git/commit - StdLib/EfiSocketLib/Ip4.c
Fix issues detected by python web-server.
authorlpleahy <lpleahy@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 24 Feb 2012 18:45:09 +0000 (18:45 +0000)
committerlpleahy <lpleahy@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 24 Feb 2012 18:45:09 +0000 (18:45 +0000)
commitf74dc4bbba84a07f8c01fea4c43aa77d800ee43c
tree7802fb388e5d12a47ac8a6bf35abae8de12a27f0
parent287b4d32eee06417557ca2229c4ed75701aa651e
Fix issues detected by python web-server.

* Removed display of TPL
* Added NOP implementation for SO_REUSEADDR
* Add better detection of socket address
* Return first address

Signed-off-by: lpleahy
Python Web server below:

---------------

import sys
import BaseHTTPServer
from SimpleHTTPServer import SimpleHTTPRequestHandler

HandlerClass = SimpleHTTPRequestHandler
ServerClass  = BaseHTTPServer.HTTPServer
Protocol     = "HTTP/1.0"

port = 80
server_address = ('', port)

HandlerClass.protocol_version = Protocol
httpd = ServerClass(server_address, HandlerClass)

sa = httpd.socket.getsockname()
print "Serving HTTP on", sa[0], "port", sa[1], "..."
httpd.serve_forever()

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13034 6f19259b-4bc3-4df7-8a09-765794883524
StdLib/EfiSocketLib/Ip4.c
StdLib/EfiSocketLib/Socket.c
StdLib/EfiSocketLib/Socket.h
StdLib/EfiSocketLib/Tcp4.c
StdLib/EfiSocketLib/Tcp6.c
StdLib/EfiSocketLib/Udp4.c
StdLib/EfiSocketLib/Udp6.c
StdLib/Include/Efi/EfiSocketLib.h