jitsi / turnserver

Open-source TURN server implementation.
Apache License 2.0
164 stars 87 forks source link

Added unit tests and refactored TurnServer #7

Closed mondain closed 8 years ago

mondain commented 8 years ago

Added unit test / suite. Modified TurnServer to use tcp socket backlog and to enforce the selected port for binding. Backlog added as a TurnServer field. Moved and grouped TurnServer start() into a more logical flow and added documentation. Removed commented-out references to getLocalAddress() and getPublicAddress() as well as the unused informational methods themselves.

ibauersachs commented 8 years ago

I'm unsure about the Console.println's. I'd feel more comfortable if they'd go to the logs.

Are the unit tests capable of running offline? I'm thinking of a potential future Debian package which isn't allowed to contact or download anything at build time. The tests could be disabled of course, but it'd be nice to run them.

And what is that (disabled) reference to Google's servers about?

mondain commented 8 years ago

The google stun address is for a sanity check; the tests are working, but I plan to extend upon them as I'm developing on my other project which uses turnserver. The tests should not require any outside network (internet) as they are currently committed, outside of any code that already exists in turnserver or ice4j.

mondain commented 8 years ago

The console prints are only copying the style which already existed in the class, minus the new tests of course. I'll endeavor to use the logger in the future.