Skip to content

Instantly share code, notes, and snippets.

View shivamS21's full-sized avatar
Focusing

Shivam Sharma shivamS21

Focusing
  • 07:18 (UTC +05:30)
View GitHub Profile
// 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 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 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)