Very first step for Windows support

This commit is contained in:
Youhei Sakurai 2019-01-21 15:33:44 +09:00
parent f0bdb0a621
commit 9e2d8b3ca4
2 changed files with 11 additions and 3 deletions

View File

@ -12,10 +12,16 @@ as taken from http://docs.python.org/dev/library/ssl.html#certificates
'''
import signal, socket, optparse, time, os, sys, subprocess, logging, errno, ssl
try:
try:
from socketserver import ForkingMixIn
except ImportError:
from socketserver import ThreadingMixIn as ForkingMixIn
except ImportError:
try:
from SocketServer import ForkingMixIn
except ImportError:
from SocketServer import ThreadingMixIn as ForkingMixIn
try:
from http.server import HTTPServer

View File

@ -14,6 +14,7 @@ as taken from http://docs.python.org/dev/library/ssl.html#certificates
import os, sys, time, errno, signal, socket, select, logging
import multiprocessing
import warnings
# Imports that vary by python version
@ -42,7 +43,8 @@ if sys.platform == 'win32':
import multiprocessing.reduction
# the multiprocesssing module behaves much differently on Windows,
# and we have yet to fix all the bugs
sys.exit("Windows is not supported at this time")
warnings.warn("Windows is not fully supported at this time",
category=RuntimeWarning)
from websockify.websocket import WebSocket, WebSocketWantReadError, WebSocketWantWriteError
from websockify.websocketserver import WebSocketRequestHandlerMixIn