rohan353 / vaccinati Goto Github PK
View Code? Open in Web Editor NEWDIDI 2020 Competition
DIDI 2020 Competition
bug when two people mine at the same time, the client who mined it second errors out, requiring a full program restart.
Threading works with 3 connections and stops when 1 connection has connected
`def setup(s):
print('Receiving Server Node \n')
c_node = recieve_c_node()
if c_node == '!NONE':
print('No available server nodes \n')
time.sleep(5)
if c_node != '!NONE':
# [addr,xport,connection_count]
ADDR = (str(c_node[0]), int(c_node[1]))
print(ADDR)
s.connect(ADDR)
ex_cons.append(c_node[0])
print('Connected to Server node \n')
return s, c_node[0]
def connection_handler():
while True:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
print('Setting up')
s, addr = setup(s)
connected = True
while connected:
print('Listening on Connection')
message = s.recv(1024).decode(FORMAT)
# more here
if message == DISCONNECT:
print('Server Disconnected')
s.close()
ex_cons.remove(addr)
connected = False
``
tried to convert to function instead of class
`thread1 = threading.Thread(target=connection_handler)
thread2 = threading.Thread(target=connection_handler)
thread3 = threading.Thread(target=connection_handler)
thread1.start()
thread2.start()
thread3.start()
`
Program lags out after entering key. Something to do with loop or threading.
title says it all
-cnodes list has problems
-connection aborted error in server node
-timers need to be removed
Make the website look better, it can be found in the server file, along with html/css from the templates folder
Clients mine the first block before getting the latest copy of the blockchain from server. This means that it takes a long time for new clients to connect.
eval, thats all im gonna say
Due to the long time mining the genesis block, if other clients connect during this happening, a bug causes the whole system to error out, requiring a server restart
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.