Bitcoin Forum
May 24, 2024, 09:29:29 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Electrum server is not responding  (Read 738 times)
bitdumper (OP)
Sr. Member
****
Offline Offline

Activity: 266
Merit: 250

One world One currency, Bitcoin.


View Profile
April 20, 2016, 03:15:23 AM
 #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?

shsmith
Newbie
*
Offline Offline

Activity: 34
Merit: 0



View Profile
April 23, 2016, 06: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.
bitdumper (OP)
Sr. Member
****
Offline Offline

Activity: 266
Merit: 250

One world One currency, Bitcoin.


View Profile
April 25, 2016, 09: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.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!