Pls find error in this OSError: [WinError 10047]

code :
import socket
soc = socket.socket(socket.AF_IRDA, socket.SOCK_STREAM)

soc.bind((socket.gethostname(), 1042))

while True:
clt, addr = soc.accept()
print(f"connection established to address {addr}")
clt.send(bytes("network programing using python ", “utf-8”))


Error: C:\Users\Apollo\PycharmProject\main\venv\Scripts\python.exe C:/Users/Apollo/PycharmProject/main/
Traceback (most recent call last):
File “C:\Users\Apollo\PycharmProject\main\”, line 2, in
soc = socket.socket(socket.AF_IRDA, socket.SOCK_STREAM)
File “C:\Users\Apollo\AppData\Local\Programs\Python\Python39\lib\”, line 232, in init
_socket.socket.init(self, family, type, proto, fileno)
OSError: [WinError 10047] An address incompatible with the requested protocol was used

Process finished with exit code 1