This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket # Import socket module | |
s = socket.socket() # Create a socket object | |
host = "1somehing.11somehing." #Ip address that the TCPServer is there | |
port = 50000 # Reserve a port for your service every new transfer wants a new port or you must wait. | |
s.connect((host, port)) | |
s.send("Hello server!") | |
with open('received_file', 'wb') as f: |