467 Commits

Author SHA1 Message Date
lubomir.marinov
446607e5d7 Allows a listening endpoint to be shared among multiple protocols (e.g. ICE-TCP, HTTP). 2015-05-01 07:58:40 +00:00
lubomir.marinov
c7b8fd2e2b Fixes warnings. Adds javadocs. 2015-04-29 09:26:24 +00:00
boris
bd3f6c663f Exposes the "logPacketToPcap" method, because it is used in Jitsi. 2015-03-30 12:19:27 +00:00
boris
3355481bf8 Drop the first packet instead of the last. 2015-03-30 10:49:39 +00:00
boris
bb688bc896 Remove code (trying to) calculate and log RTP statistics. 2015-03-30 10:49:32 +00:00
boris
b0c8e73b36 Minor formatting changes, make methods package-private. 2015-03-30 10:49:23 +00:00
gp
03c5f7c162 Renames the "reachable" flag to "alive" and adds additional comments explaining its purpose and usage. 2015-03-19 11:15:26 +00:00
gp
b564f06732 Adds a "reachable" flag to the ConnectivityCheck*.java for debugging purposes. 2015-03-19 10:11:05 +00:00
boris
23d3b809cb Makes sure that threads in receive() get a SocketException when the
socket closes.
2015-03-13 13:39:01 +00:00
boris
cd826a1233 Treat the TERMINATED state the same as COMPLETED when handling binding
responses.
2015-03-13 13:38:38 +00:00
boris
89fd7625fe Synchronize access to the Agent's state. Harden state checks to avoid
bugs due to race conditions. Don't fire state change events unless the
state indeed changed. Improve logging.
2015-03-13 13:38:19 +00:00
boris
4cb51d0302 Respects the IPv6 configuration in SinglePortUdpHarvester. Fixes typos. 2015-03-09 18:24:51 +00:00
boris
f9ee7aedba Synchronizes access to an Agent's termination thread
because of an observed race condition leading to calling
start() twice.

14:29:26.756 INFO: [28] org.ice4j.ice.ConnectivityCheckClient.processSuccessResponse() Nomination confirmed for pair: 192.168.1.116:7777/udp/host -> 192.168.1.116:62365/udp/prflx (stream.RTP)
14:29:26.757 INFO: [28] org.ice4j.ice.CheckList.handleNominationConfirmed() Selected pair for stream stream.RTP: 192.168.1.116:7777/udp/host -> 192.168.1.116:62365/udp/prflx (stream.RTP)
14:29:26.758 INFO: [29] org.ice4j.ice.Agent.checkListStatesUpdated() CheckList of stream stream is COMPLETED 14:29:26.758 INFO: [28] org.ice4j.ice.Agent.checkListStatesUpdated() CheckList of stream stream is COMPLETED
14:29:26.758 INFO: [29] org.ice4j.ice.Agent.checkListStatesUpdated() ICE state is COMPLETED
14:29:26.758 INFO: [28] org.ice4j.ice.Agent.checkListStatesUpdated() ICE state is COMPLETED
14:29:26.758 INFO: [29] org.jitsi.videobridge.IceUdpTransportManager.info() ICE processing state of IceUdpTransportManager #2dcab970 (for channels ca079f8cc6778b96 38480814176d5f95 727e3ef175b4a77c)  of con ference bd46bc5c213945f7 changed from Running to Completed.
14:29:26.759 INFO: [28] org.jitsi.videobridge.IceUdpTransportManager.info() ICE processing state of IceUdpTransportManager #2dcab970 (for channels ca079f8cc6778b96 38480814176d5f95 727e3ef175b4a77c)  of con ference bd46bc5c213945f7 changed from Completed to Completed.
14:29:26.766 INFO: [29] org.ice4j.ice.Agent.logCandTypes() Harvester used for selected pair for stream.RTP: host
14:29:26.769 WARNING: [28] org.ice4j.stack.NetAccessManager.handleFatalError() A message processor has unexpectedly stopped. AP:org.ice4j.stack.MessageProcessor@de4a162
java.lang.IllegalThreadStateException
    at java.lang.Thread.start(Thread.java:705)
    at org.ice4j.ice.Agent.scheduleTermination(Agent.java:1930)
    at org.ice4j.ice.Agent.checkListStatesUpdated(Agent.java:1726)
    at org.ice4j.ice.ConnectivityCheckClient.updateCheckListAndTimerStates(ConnectivityCheckClient.java:437)
    at org.ice4j.ice.ConnectivityCheckClient.processResponse(ConnectivityCheckClient.java:360)
    at org.ice4j.stack.StunClientTransaction.handleResponse(StunClientTransaction.java:492)
    at org.ice4j.stack.StunStack.handleMessageEvent(StunStack.java:1028)
    at org.ice4j.stack.MessageProcessor.run(MessageProcessor.java:159)
    at java.lang.Thread.run(Thread.java:745)
2015-03-09 18:24:42 +00:00
boris
818cd10a2f Reduces the log level of logs when freeing an agent and its streams. 2015-03-09 18:24:33 +00:00
boris
7268fb7a75 Logs failures to get host candidates. 2015-03-09 18:24:19 +00:00
boris
7b21db735f Log a message and abort harvesting, rather than failing with an
exception, in case harvesting is not possible due to the harvester
not supporting Agents with multiple components.
2015-03-04 08:01:36 +00:00
boris
59deb864f7 Adds a utility method for creating single-port harvesters for the IP
addresses considered "allowed" by ice4j.
2015-03-02 14:05:58 +00:00
boris
ab81b469af Controls the use of the dynamic host harvester with a property instead
of an API call.
2015-03-02 14:05:51 +00:00
boris
61d82e0885 Adds a UDP harvester using a single port. 2015-02-27 16:42:49 +00:00
boris
a55f6c6be6 Supports multiple "host" harvesters. Allows the default dynamic harvester to be disabled. 2015-02-27 16:42:37 +00:00
boris
5ebfe11c55 Refactors NetAccessManager. Allows UDP sockets to be associated with a
specific remote address.
2015-02-27 16:42:25 +00:00
boris
f322f67f93 Refactors the finding of a CandidatePair's socket. 2015-02-27 16:42:15 +00:00
boris
6999ebc19d Removes code duplication. 2015-02-27 16:42:05 +00:00
lubomir.marinov
5e489a8f05 Fixes a (possible) NullPointerException. 2015-02-08 14:02:17 +00:00
boris
50dd346aaf Supports running an Agent without any remote candidates. 2015-01-22 16:12:07 +00:00
boris
d9e14a6ba7 Fix deprecation warning. 2015-01-22 16:11:59 +00:00
boris
0c30dc7ae6 Fix a bug in Agent.getSelectedPair(), update documentation. 2015-01-22 16:11:54 +00:00
boris
7d58fe7a29 Supports address filtering for UDP host candidates. 2015-01-20 12:28:49 +00:00
lubomir.marinov
54f6fd3f86 Fixes technical errors in method invocations. Optimizes type checks on packet send and receive. 2014-11-12 14:12:37 +00:00
boris
088ca3609f Adds tcptype to all TCP candidates. 2014-10-14 19:01:14 +00:00
boris
004d962d71 Fixes a failure to detect end-of-stream/socket closed condition.
De-registers channels from the selector when they time-out.
2014-10-14 12:26:29 +00:00
lubomir.marinov
e273e24ee6 Attempts to respect DatagramSocket and Socket SO_RCVBUF and, thus, limits the possible retained memory. 2014-10-14 12:16:39 +00:00
lubomir.marinov
872bf7e8ef Does not use instanceof on each and every RTP packet. 2014-10-10 18:34:22 +00:00
boris
7b8d6b15a0 Adds a close method, makes threads daemon threads, removes an unnecessary field. 2014-10-10 13:16:10 +00:00
boris
1b24803c90 Reads in the pseudo SSL handshake and initial STUN packet in non-blocking mode. 2014-10-10 13:16:03 +00:00
boris
a281457a37 Removes a superfluous "synchronized" block. 2014-10-09 11:51:10 +00:00
lubomir.marinov
fc0b558497 Reduces the number of times that a received packet is internally copied. Reduces the scopes of synchronization blocks and breaks synchronization blocks into multiples on different objects. Optimizes hashtable iterations. Fixes warnings. 2014-10-09 09:47:26 +00:00
boris
9eca04ecad Adds an property to disable the use of IPv6 link local addresses for candidate allocation. 2014-10-03 12:29:38 +00:00
boris
707d258084 Implements lists of allowed and blocked IP addresses for use in TCP candidate allocation. 2014-10-03 12:29:29 +00:00
boris
d937a29022 Treats ClosedChannelException as a fatal error and stops the Connector. 2014-10-02 13:15:20 +00:00
boris
868228b3f6 Names the TCP harvester read thread. 2014-10-02 13:15:13 +00:00
lubomir.marinov
7454ebd7c5 Fixes warnings. 2014-09-15 23:40:15 +00:00
boris
26c34b25b4 Allows additional addresses and/or ports to be configured. Purge the components map. 2014-09-09 14:46:16 +00:00
boris
5f67322b90 Exports the obtained local/public addresses via the getFace() and getMask() methods. 2014-09-09 14:46:09 +00:00
boris
89082b2c1a Take into account the transport protocol for mapped candidates. Preserve
the isSSL flag.
2014-09-09 14:46:01 +00:00
boris
f08c6546ae Use the local candidate base, if available. 2014-09-09 14:45:53 +00:00
paweldomas
65a427cc38 Adds parsing of SSLTCP transport type. 2014-09-08 15:12:22 +00:00
boris
8a7f8c1eea Does not retransmit StunClientTransaction-s over TCP. 2014-09-05 16:47:03 +00:00
boris
17276fde15 Uses the first received STUN packet instead of waiting for a retransmission. 2014-09-05 16:46:57 +00:00
boris
6bc0b7c4de Fixes a bug with the accept thread busy waiting in select(), simplifies code. 2014-09-05 16:46:48 +00:00