I cant make my python server run with my IPV 4 address

Viewed 32
import socket

PORT = 5050
SERVER = "Insert my public IPV4 address here"
ADDR = (SERVER, PORT)

server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server.bind(ADDR)  #here is the line I get the error for

The error says:

Traceback (most recent call last):
  File "The Directory", line 15, in <module>
    server.bind(ADDR)
OSError: [WinError 10049] The requested address is not valid in its context

Can I not use my IPV4 to make the server public? If not then what do I use?

0 Answers
Related