Package net.i2p.sam
Class SAMv3DatagramServer
java.lang.Object
net.i2p.sam.SAMv3DatagramServer
- All Implemented Interfaces:
Handler
This is the thread listening on 127.0.0.1:7655 or as specified by
sam.udp.host and sam.udp.port properties.
This is used for both repliable and raw datagrams.
- Since:
- 0.9.24 moved from SAMv3Handler
-
Constructor Summary
ConstructorsConstructorDescriptionSAMv3DatagramServer(SAMBridge parent, String host, int port, Properties props) Does not start listener. -
Method Summary
Modifier and TypeMethodDescriptiongetHost()intgetPort()voidsend(SocketAddress addr, ByteBuffer msg) voidstart()Only call once.voidCannot be restarted.
-
Constructor Details
-
SAMv3DatagramServer
public SAMv3DatagramServer(SAMBridge parent, String host, int port, Properties props) throws IOException Does not start listener. Caller must call start().- Parameters:
parent- may be nullprops- ignored for now- Throws:
IOException
-
-
Method Details
-
start
public void start()Only call once.- Since:
- 0.9.22
-
stopHandling
public void stopHandling()Cannot be restarted.- Specified by:
stopHandlingin interfaceHandler- Since:
- 0.9.22
-
send
- Throws:
IOException
-
getHost
- Since:
- 0.9.24
-
getPort
public int getPort()- Since:
- 0.9.24
-