22 Commits

Author SHA1 Message Date
bgrozev
3a55627ba0
ref: Port StunMappingHarvester config. (#215) 2020-09-25 11:39:13 -05:00
bgrozev
29ae8061ad
Port more config properties. (#214)
* ref: Port the "disable link-local addresses" property.

* ref: Port the receive buffer size property.

* ref: Port the "disable ipv6" property.

* ref: Port the "dynamic ports" propertty.

* ref: Port the timeout property.

* test: Add tests for the new properties.
2020-09-14 12:43:56 -05:00
bgrozev
f8a506ef70
Use metaconfig, port some properties. (#212)
* Use metaconfig, port some properties.

* ref: Use the typesource config to read system properties.

* fix: Fix a typo.

* Add tests for AgentConfig.
2020-08-24 11:36:22 -05:00
Yury Yaroshevich
7989977e1e Added Message-Integrity attribute to Role Conflict message. (#187)
* Added missing attributes to Role Conflict message.

* Updated logs and fixed comments.

* Added unit test of role conflict recovery.

* Fixed long lines.
2019-09-30 13:27:07 -07:00
bbaldino
43a9f282d2
use classes in jitsi-utils (#188)
* use queuestatistics/ratestatistcs from jitsi-utils

* remove packetqueue (exists in jitsi-utils)

* use executorfactory in jitsi-utils

* use customizablethreadfactory on jitsi-utils

* remove asyncqueuehandler (exists in jitsi-utils)
2019-09-25 08:54:06 -07:00
Han Xu
59461c9d13 Clear system property at the end of test.
The current test is passing, but still I think it's better to clear
the system property it sets.
2019-04-24 09:44:02 +01:00
Han Xu
105a49749e Fix Retransmitter creation to take effect of originalWaitInterval config 2019-04-24 09:44:02 +01:00
Peter Sear
0ea60d85b3 Add unit tests for org.ice4j.ice.NetworkUtilsTest
These tests were written using Diffblue Cover.
2019-03-28 09:43:48 -07:00
Yury Yaroshevich
0be8f1aae7 Offload I/O from ScheduledExecutorService thread in StunKeepAliveRunner (#170)
* Added periodic runnable to offload I/O from ScheduledExecutorService's thread.

* Added missing class header.

* Do not invoke `getMillisecondsDelayUntilNextRun` from synchronized section.

* Use java.time.Duration to represent time interval.

* Use synchronized block in scheduleNextRun.
2019-02-11 09:37:44 -08:00
Yury Yaroshevich
6beca2903c Invoke releasePacket on dropped items in PacketQueue. (#164)
* Invoke releasePacket on dropped items in PacketQueue.

* Fixed comment.

* Use Object.notify instead of Object.notifyAll in PacketQueue.doAdd

* Fixed formatting.

* Use atomic for numDroppedPackets because it is no longer under synchronized block.

* Copy number of dropped packets to local variable.
2018-12-17 09:16:16 -08:00
Yury Yaroshevich
c325421927 Do not explicitly create threads in PacketQueue (#157)
* Do not explicitly create threads in PacketQueue, but borrow threads for execution from ExecutorService.

* Added method to release created packet in PacketQueue.

* Added constructor overload to override default ExecutorService of PacketQueue.

* Fixed inconsistent formatting.

* Added throttling support to PacketQueue.

* Added performance tests for various configurations of PacketQueue.

* Updated comments.

* Added test for fixed size thread pool to compare it with ForkJoinPool.

* Fixed comments.

* Changed default values of PacketQueue configuration to closer match old implementation.

* Removed unused constants.

* Added tests to reveal introduced bug. Fixed bug.

* Fixed comments in PacketsQueue.

* Do not hard code class name in thread pool name.

* Return 0 when handler is null (should be not be reachable, but anyway).

* Added test to check capacity constraint of PacketQueue.

* Replaced manual capacity check with checking offer return value.

* Made throttler class static.

* Added test to check that PacketQueue thread is release without work.

* Do GC before running performance benchmark.

* Fixed formatting and added timeout.

* Added test to check cooperative multi-tasking behavior when executor is shared between queues and has less threads then executor has.

* Minor code rearrangement.

* Use dedicated syncronization object for sate of AsyncPacketReader.

* Stop PacketQueue when benchmark is finished.

* Added constant for number of benchmark iterations.

* Minor code style enhancements.

* Added myself to the list of authors.

* Added test to check that million of PacketQueue can share single thread without eating CPU when idle.

* Extracted AsyncQueueHandler class.

* Fixed imports.

* Minor fixes.

* Minimize diff by undoing unnecessary changes.

* Minimized diff.

* Reduce diff.

* Added constructor argument null checks.

* Removed throttling and simplified AsyncQueueHandler.

* Reviewed usage of syncronized blocks.

* Moved variable closer to usage.

* Fixed according to code review.

* Added extra constructor.

* Removed cancel from onYield because it's unnecessary after removing throttling.

* Rearranged onYield and handleQueueItemsUntilEmpty, introduced rescheduleReader

* Updated copyright.
2018-12-12 08:37:28 -08:00
Guus der Kinderen
59693a4894 AbstractUdpListener should be able to release its resources (#140)
* AbstractUdpListener should be able to release its resources

A new 'close' method has been added to AbstractUdpListener that is modeled after the 'close' implementation
of AbstractTcpListener.

This change can be used to prevent the issue described in https://github.com/jitsi/ice4j/issues/139

* Prevent concurrent modification of collection.

Part of the processing is removal from the collection that is being iterated over. To
avoid concurrent modification exceptions, a copy of the collection is made, prior to
iteration.

* Style fixes and added copyright notice.
2018-05-16 18:43:50 -04:00
Ingo Bauersachs
203ffbd92b Add unit test for changed address parsing 2017-01-07 13:41:42 +01:00
Boris Grozev
15a2df1e59 feat: Splits the API to obtain sockets for a candidate/candidate pair.
The public-facing API returns the socket instance for the associated
Component, while the internal API (getCandidateIceSocket) returns
the internal socket instance for the candidate.
2016-11-28 16:11:24 -06:00
Ingo Bauersachs
71b2874d46 Remove obsolete Ant-build and the embedded libraries 2016-04-18 22:14:02 +02:00
Ingo Bauersachs
9cbedb3a95 Use only OSS components for jain-sdp
The embedded jain-sdp library includes some interface-files that are
covered by a non-free license. Remove them and use a free version instead
that is published on Maven Central.
2016-04-02 15:01:37 +02:00
Lyubomir Marinov
ecc9e59564 Fixes (simple) warnings issued by IntelliJ IDEA's 'Analyze > Inspect Code...' feature. 2016-03-25 20:35:20 -05:00
Paul Gregoire
847f9a6e4e Fixed to prevent failure with systems that dont support window scaling. 2015-10-28 11:03:31 -04:00
Ingo Bauersachs
da2194444c Fix line endings in PseudoTCP code 2015-10-28 15:36:09 +01:00
damencho
26296f3cbe Updates the license headers and adds license file. 2015-10-01 15:28:55 -05:00
Lyubomir Marinov
7072173ed3 Fixes GitHub issue #22: CandidateAttribute.clone() causes NullPointerException. 2015-07-28 11:56:35 -05:00
Lyubomir Marinov
4d08a7764f Moves the src and test directories to their respective Maven standard directory layout locations. 2015-07-28 08:48:27 -05:00