File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 1- ## Example use of tcp v0.91 ##
1+ ## Example use of tcp v0.92 ##
22## R. M. Jones ##
33## 01/07/2017 ##
44
55import tcp #imoprts the module that is included with this file
66
7- def server ():
7+ def server (BUFFER_SIZE , TCP_IP = tcp . getmyip (), TCP_PORT = 5050 ):
88
99 data = 0
10- TCP_IP = tcp .getmyip () #Gets your private ip address
11- TCP_PORT = int (input ("Enter port: " )) #The port that will be open
10+ # TCP_IP = tcp.getmyip() #Gets your private ip address
11+ # TCP_PORT = int(input("Enter port: ")) #The port that will be open
1212 BUFFER_SIZE = 20 # Normally 1024, but we want fast response
1313
1414 conn = tcp .bind (TCP_IP , TCP_PORT )
@@ -24,7 +24,7 @@ def server():
2424if __name__ == "__main__" :
2525 info = 0
2626 while info != "stop" :
27- info , s = server ()
27+ info , s = server (20 )
2828 print (info )
29- tcp .send (data , s )
29+ tcp .send (info , s )
3030 s .close ()
You can’t perform that action at this time.
0 commit comments