Skip to content

socket.error: [Errno 98] Address already in use #8

@DamonDBT

Description

@DamonDBT

i run your code on debian with python 2.7. And it throw an error : socket.error: [Errno 98] Address already in use
i change the ip:port to my server ip+new port. but the error still exist.
i search the question online . someonte say to add one line code below , but i can't find where to add ,
self.recSocket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
self.recSocket.settimeout(CHECK_TIMEOUT)
self.recSocket.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR,1)
self.recSocket.bind(('', UDP_PORT))
the url: https://blog.csdn.net/chenyulancn/article/details/8181238
hope you can help me. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions