org.lastbamboo.common.portmapping
Interface UpnpService
public interface UpnpService
addUpnpMapping
int addUpnpMapping(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 = 0localPort - the local portexternalPortRequested - the external port being requested
- Returns:
- -1 if the mapping fails otherwise the index that identifies this
port mapping (mappingIndex)
removeUpnpMapping
void removeUpnpMapping(int mappingIndex)
shutdown
void shutdown()
Copyright © 2013 LittleShoot. All Rights Reserved.