Author

Topic: Electrum server is not responding (Read 741 times)

sr. member
Activity: 266
Merit: 250
One world One currency, Bitcoin.
April 25, 2016, 05:12:23 AM
#3
I wrote a electrum client in python.
it gets response from coinomi server,  but other server gives no response and close the connection.
I am confused what I am doing wrong?
Try port 50001.
Port 50002 is usually SSL and you don't have code to handle that.
Port 50001 is for plain TCP.
Thanks bro. It worked.
When I searched for electrum server, they all listed 50002 as it's port, but none of them told it was ssl.
newbie
Activity: 34
Merit: 0
April 23, 2016, 02:31:39 PM
#2
I wrote a electrum client in python.
it gets response from coinomi server,  but other server gives no response and close the connection.
I am confused what I am doing wrong?
Try port 50001.
Port 50002 is usually SSL and you don't have code to handle that.
Port 50001 is for plain TCP.
sr. member
Activity: 266
Merit: 250
One world One currency, Bitcoin.
April 19, 2016, 11:15:23 PM
#1
I wrote a electrum client in python.
Code:
 
import asyncore,socket
class electrum(asyncore.dispatcher):
def __init__(self,ip,port):
asyncore.dispatcher.__init__(self)
self.create_socket(socket.AF_INET,socket.SOCK_STREAM)
self.connect((ip,port))
self.buffer='{"id":0,"method":"server.version","params":["2.5","0.9"]}\n'
self.re=""
def handle_connect(self):
pass
def handle_close(self):
self.close()
def handle_read(self):
self.re=self.recv(8192)
print self.re
def writable(self):
return (len(self.buffer)>0)
def handle_write(self):
sent=self.send(self.buffer)
print self.buffer[:sent]
self.buffer=self.buffer[sent:]
e=electrum("electrum.neocrypto.io",50002)
e.buffer+='{"id":1,"method":"blockchain.headers.subscribe","params":[]}\n'
asyncore.loop()

it gets response from coinomi server,  but other server gives no response and close the connection.
I am confused what I am doing wrong?
Jump to: