Skip to content

WIZNET5K instances store a single source port but these are assigned per socket. #120

Open
@BiffoBear

Description

@BiffoBear

The WIZNET5K driver stores a single value for a source port as an instance variable. Source ports are set per hardware socket before each socket is opened.
I don't think this should be an instance variable, but should be an attribute of the socket_open method. The 'port' attribute can default to 0 so that a random port is still assigned if no port is specified.

eth.socket_open(socket_number, port=68, conn_mode=SNMR_TCP)

is more intuitive and less prone to error than

eth.src_port = 68
eth.socket_open(socket_number, conn_mode=SNMR_TCP)
eth.src_port = 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions