@@ -49,6 +49,7 @@ def handleClose(self):
49
49
parser .add_option ("--example" , default = 'echo' , type = 'string' , action = "store" , dest = "example" , help = "echo, chat" )
50
50
parser .add_option ("--ssl" , default = 0 , type = 'int' , action = "store" , dest = "ssl" , help = "ssl (1: on, 0: off (default))" )
51
51
parser .add_option ("--cert" , default = './cert.pem' , type = 'string' , action = "store" , dest = "cert" , help = "cert (./cert.pem)" )
52
+ parser .add_option ("--key" , default = './key.pem' , type = 'string' , action = "store" , dest = "key" , help = "key (./key.pem)" )
52
53
parser .add_option ("--ver" , default = ssl .PROTOCOL_TLSv1 , type = int , action = "store" , dest = "ver" , help = "ssl version" )
53
54
54
55
(options , args ) = parser .parse_args ()
@@ -58,7 +59,7 @@ def handleClose(self):
58
59
cls = SimpleChat
59
60
60
61
if options .ssl == 1 :
61
- server = SimpleSSLWebSocketServer (options .host , options .port , cls , options .cert , options .cert , version = options .ver )
62
+ server = SimpleSSLWebSocketServer (options .host , options .port , cls , options .cert , options .key , version = options .ver )
62
63
else :
63
64
server = SimpleWebSocketServer (options .host , options .port , cls )
64
65
0 commit comments