Cannot bind with given Address!? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Cannot bind with given Address!?

I try to bind an internet socket with my public IP address! But bind() function doesn't allow me to do that! How do i solve this problem! It raise this run time error: "Can't assign requested address"

11th Jan 2023, 6:47 PM
Dilip ishara
Dilip ishara - avatar
4 Answers
+ 1
no impossible, because the public address belong to another device interface and you only allowed to bind an ip address that is belong to your computer (one of your interfaces 'ethernet, wifi..')
12th Jan 2023, 4:01 PM
Amine Laaboudi
Amine Laaboudi - avatar
+ 1
wait what ? ishara are you trying to bind the address of a remote host with a local program ?
12th Jan 2023, 12:40 AM
Amine Laaboudi
Amine Laaboudi - avatar
+ 1
Amine Laaboudi Thank you for clarifying that!
12th Jan 2023, 5:57 PM
Dilip ishara
Dilip ishara - avatar
0
Amine Laaboudi local program bind with public IP address! Isn't it possible?
12th Jan 2023, 7:01 AM
Dilip ishara
Dilip ishara - avatar