Commit 364f446c authored by Taddeüs Kroes's avatar Taddeüs Kroes

Added REUSEADDR to server socket options in exmaple code

parent 80ac440e
......@@ -69,6 +69,7 @@ Basic usage
Example of an echo server (sends back what it receives):
import socket
import wspy
class EchoConnection(wspy.Connection):
......@@ -83,6 +84,7 @@ Basic usage
print 'Connection closed'
server = wspy.websocket()
server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
server.bind(('', 8000))
server.listen(5)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment