문제

I want to open port 5555 on my machine using UPnP to the world. Could you please provide me with such Java sample for any sutable Opensource library. I need A CODE SAMPLE like one I can give you for C# using this lib

using TCMPortMapper;

private void Form1_Load()
{
  PortMapper.SharedInstance.Start();
  PortMapping pm = new PortMapping(localPort, publicPort, 
         PortMappingTransportProtocol.TCP);
  PortMapper.SharedInstance.AddPortMapping(pm);
}
private void Form1_FormClosing()
{
  PortMapper.SharedInstance.StopBlocking();
}
도움이 되었습니까?

해결책

Have you tried googling for "java upnp library"?

My first hit was one UPNPLib that looks reasonable. sample for UPNP mapping with same. there are also others:

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top