Connecting python to D on socket of localhost : target machine actively refuses connection

Sergei Degtiarev sdegtiarev at yahoo.com
Sat Sep 23 02:26:40 UTC 2017


On Friday, 22 September 2017 at 04:06:08 UTC, Enjoys Math wrote:
>
> Here's my minimal D code (server.d):
> public:
> 	this(ushort port, string address="") {
> 		super(& run);
> 		
> 		if (address == "")
> 			address = "DESKTOP-T49RGUJ";
>
> 		this.port = port;
> 		this.address = address;
.........
> 			listener.bind(new InternetAddress(address, port));

It seems to me, you pass invalid address to bind(). 
InternetAddress takes ipv4 dot notation string x.x.x.x, and for 
bind you are to supply INADDR_ANY



More information about the Digitalmars-d-learn mailing list