org.lastbamboo.common.portmapping
Interface NatPmpService


public interface NatPmpService


Method Summary
 int addNatPmpMapping(PortMappingProtocol protocol, int localPort, int externalPortRequested, PortMapListener portMapListener)
          The return value is an index that identifies this port mapping.
 void removeNatPmpMapping(int mappingIndex)
           
 void shutdown()
           
 

Method Detail

addNatPmpMapping

int addNatPmpMapping(PortMappingProtocol protocol,
                     int localPort,
                     int externalPortRequested,
                     PortMapListener portMapListener)
The return value is an index that identifies this port mapping. This is used to refer to mappings that fails or succeeds in the PortMapEvent If The mapping fails immediately, the return value is -1, which means failure. There will not be any event generated for mappings that fail with a -1 return value.

Parameters:
protocolType - none = 0, udp = 1, tcp = 2, other than these values results in none = 0
localPort - the local port
externalPortRequested - the external port being requested
Returns:
-1 if the mapping fails otherwise the index that identifies this port mapping (mappingIndex)

removeNatPmpMapping

void removeNatPmpMapping(int mappingIndex)

shutdown

void shutdown()


Copyright © 2013 LittleShoot. All Rights Reserved.