Skip to content

ICENegotiator fails with remote candidate #2

Description

@ronnierap

Hi TKing,

I am wondering about the following: maybe i am misinterpreting it. But when resolving local and remote candidates with the ICENegotiator, We get an exception when doing remote candidates.

It is logical the remote ip cannot be bound locally, because it is the router's IP and not the machines IP. Only the local ip is added after this exception offcourse. Is this normal behaviour: not returning the remote candidate?

I have added sysout calls to log what was happening.

add host candidate [local] /192.168.1.10
add server reflexive address, Discovery Info:
Network interface: en1
Local IP address: 192.168.1.10
Result: Symmetric Cone NAT handles connections.
Public IP address: 10.0.10.10

[remote] /10.0.10.10
java.net.BindException: Can't assign requested address
at java.net.PlainDatagramSocketImpl.bind0(Native Method)
at java.net.AbstractPlainDatagramSocketImpl.bind(AbstractPlainDatagramSocketImpl.java:95)
at java.net.DatagramSocket.bind(DatagramSocket.java:376)
at java.net.DatagramSocket.(DatagramSocket.java:231)
at java.net.DatagramSocket.(DatagramSocket.java:284)
at de.javawi.jstun.test.demo.ice.Candidate.(Candidate.java:44)
at de.javawi.jstun.test.demo.ice.ICENegotiator.gatherCandidateAddresses(ICENegotiator.java:98)
at de.javawi.jstun.test.demo.ice.ICENegotiator.main(ICENegotiator.java:186)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions