This file contains hidden or 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
| // this is client side code where the files are send from a folder names 'electro' | |
| from socket import * | |
| import os | |
| import tqdm | |
| CHUNKSIZE = 1_000_000 | |
| buffer_size = 4096 | |
| # Make a directory for the received files. | |
| sock = socket() | |
| sock.connect(('localhost',9999)) |
This file contains hidden or 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
| //this is server's side code where I am recieving the files and trying to save them into a folder names 'serv' | |
| from socket import * | |
| import os | |
| CHUNKSIZE = 1_000_000 | |
| server = socket() | |
| server.bind(('localhost',9999)) | |
| server.listen(3) | |
| os.makedirs('serv',exist_ok=True) |
This file contains hidden or 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
| //this is server's side code where I am recieving the files and trying to save them into a folder names 'serv' | |
| from socket import * | |
| import os | |
| CHUNKSIZE = 1_000_000 | |
| server = socket() | |
| server.bind(('localhost',9999)) | |
| server.listen(3) | |
| os.makedirs('serv',exist_ok=True) |