I'm trying to use Ice4j, but there are no tutorials for it or anything. I have tried looking at the source code, but everything goes somewhere else and nothing is explained.
I've read the IcePseduTcp test and I want to implement my own but the problem is the test creates both local and remote agents together and then has them interact with each other. How do I separate the two, so that I have two programs, one that acts as the local controlling agent, and the other acts as the remote agent, and then have the local agent discover the remote agent?
The function Ice.transferRemoteCandidates
uses both Agents, but how do I use the first agent to find the other?
addRemoteCandidateToAgent with addLocalCandidateToContentList will help you.
With addLocalCandidateToContentList, you build YOUR local ContentList (the data that need to be sent to the remote peer/server, and he will use it like in addRemoteCandidateToAgent).
Look over here: http://stellarbuild.com/blog/article/ice4j-networking-tutorial-part-1
I think that tutorial will explain how to connect the two agents. At least he uses SDP which doesn't need control.
If you want a SIP tutorial perhaps try: http://blog.sharedmemory.fr/en/2014/06/22/gsoc-2014-ice4j-tutorial/