How to use a specific src port when using the Snap7 client to connect with a server?

39 Views Asked by At

I am trying to communicate with a target using the Python-snap7 client.

The following code is the one iam using:

import snap7
target = snap7.client.Client()
target.connect(ipaddress, rack, slot, 102)
target.get_connected()

Hoever, the client uses a random source port to connect with the target. Does anybody knows how to define the source port for the client? (suppose same with socket programming?)

Thanks

0

There are 0 best solutions below