KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I formerly used the code below to bind IPv4 address to Python socket as source ip address. import socket true_socket = socket.socket def bound_socket(*a, **k): sock = true_socket(*a, **k) sock.bind((sourceIP, 0)) return sock socket.socket = bound_socket Does above code work for IPv6 address? If not, how can I bind an IPv6 address? Thanks in advance!
Tags (comma-separated)
Save Edits
Cancel