File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 12
12
BACKLOG = 50 # how many pending connections queue will hold
13
13
MAX_DATA_RECV = 999999 # max number of bytes we receive at once
14
14
DEBUG = True # set to True to see the debug msgs
15
- BLOCKED = [] # just an example. Remove with [""] for no blocking at all.
15
+ BLOCKED = [] # just an example. Remove with [""] for no blocking at all.
16
16
17
17
#**************************************
18
18
#********* MAIN PROGRAM ***************
@@ -21,14 +21,15 @@ def main():
21
21
22
22
# check the length of command running
23
23
if (len (sys .argv )< 2 ):
24
- print "usage: proxy <port>"
25
- return sys .stdout
24
+ print "No port given, using :8080 (http-alt)"
25
+ port = 8080
26
+ else :
27
+ port = int (sys .argv [1 ]) # port from argument
26
28
27
29
# host and port info.
28
30
host = '' # blank for localhost
29
- port = int (sys .argv [1 ]) # port from argument
30
31
31
- print "Proxy Server Running on " ,host ,":" ,sys . argv [ 1 ]
32
+ print "Proxy Server Running on " ,host ,":" ,port
32
33
33
34
try :
34
35
# create a socket
You can’t perform that action at this time.
0 commit comments