[Python] Python socket-module: How to change the local port on the client side?

Discussão em 'Python' iniciado por Stack, Fevereiro 1, 2025.

  1. Stack

    Stack Membro Participativo

    I want to get packages from a network using TCP/IP as a client.

    With ...

    connect((TCP_IP, TCP_PORT))


    ... I can change the port of the peer address. But can I change the port of my local computer?

    EDIT: I want to use a network card with four ports. The network card is connected to a measurement device that sends a lot of data. How can I see where the data goes? How can I distinguish between these four ports?

    Continue reading...

Compartilhe esta Página