Skip to content

connect to coap server with specific source port #90

Closed
@atreya2011

Description

I would like to know if there is a way to create a new client, by specifying a specific UDP source port like how we do with the net package.

        server, _ := net.ResolveUDPAddr("udp", "google.com:80")
        client, _ := net.ResolveUDPAddr("udp", ":50000")
        conn, err := net.DialUDP("tcp", client, server)

Right now, the API does not seem to provide a way to specify the UDP port to send requests.

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions