You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thanks for your mining proxy to stop greedy Claymore from getting too much money.
In your code you set
def receive_from(connection):
buffer = ""
# We set a 2 second time out depending on your
# target this may need to be adjusted
connection.settimeout(0)
Set a timeout on blocking socket operations. The value argument can be a nonnegative float expressing seconds, or None. If a float is given, subsequent socket operations will raise a timeout exception if the timeout period value has elapsed before the operation has completed. Setting a timeout of None disables timeouts on socket operations. s.settimeout(0.0) is equivalent to s.setblocking(0); s.settimeout(None) is equivalent to s.setblocking(1).
New in version 2.3.
If you don't set this the call is in so called blocking mode, means it returns only when there is new data. So CPU is used as little as possible.
When using this you could avaoid time.sleep(0.001) in 170
btw. I've changed to time.sleep(0.01) and now have reduced CPU usage a lot.
So do you have a special reason for the command in non blocking mode? Normally when programming network functions I work in blocking modes. Thus programs need a little CPU as possible.
The text was updated successfully, but these errors were encountered:
I made a different version based on asyncio, which is even more lightweight.
You can check the code on my GitHub, it's currently targetting equihash but might be generic enough to work on ethash as well.
Hi JuicyPasta,
thanks for your mining proxy to stop greedy Claymore from getting too much money.
In your code you set
What background has setting "connection.settimeout(0)" ?
https://docs.python.org/2/library/socket.html
If you don't set this the call is in so called blocking mode, means it returns only when there is new data. So CPU is used as little as possible.
When using this you could avaoid time.sleep(0.001) in 170
btw. I've changed to time.sleep(0.01) and now have reduced CPU usage a lot.
So do you have a special reason for the command in non blocking mode? Normally when programming network functions I work in blocking modes. Thus programs need a little CPU as possible.
The text was updated successfully, but these errors were encountered: