offbynull / portmapper

Java library that maps ports on NAT-enabled routers (supported protocols: UPnP-IGD/NAT-PMP/PCP).
Apache License 2.0
88 stars 17 forks source link

Refactor portmapper #2

Closed offbynull closed 8 years ago

offbynull commented 9 years ago

Actor-based framework should make this much easier to test.

May need a Serializer implementation specifically for NAT-PMP/PCP messages. May need a custom gateway for HTTP and UDP broadcasts

offbynull commented 9 years ago

Remove guava

offbynull commented 9 years ago

This needs to be refactored such that a new thread isn't spawned that maintains the port mapping. Make it so that the user is responsible for maintaining the port mapping. Give a duration that the user should update at.

This needs to be done because systems like Android go to sleep when there's no activity, which means the threads pause, which means wakeups won't trigger. If the user controls when to next update, he/she can setup wakelocks as necessary.

offbynull commented 8 years ago

This is done.