EzDevInfo.com

ice

track changes with javascript

Any experiences with C# and ZeroC ICE

http://www.zeroc.com/

I hear it's much better at cross platform interop and with performance.


Source: (StackOverflow)

Whether STUN server is needed within LAN for WebRTC?

I have developed a p2p video chat using Webrtc. I am aware that STUN or TURN server is required to identify the public IP behind NAT. Currently am using Google's STUN server.

I have the application installed in the server connected to the LAN which will not have internet access, do I need to install the STUN server in my server to make Webrtc video chat work within the LAN?


Source: (StackOverflow)

Advertisements

Are there any good tutorials for ice4j? [closed]

I have just started using ice4j as an ICE client. I am experimenting with it, and I want to create a simple chat application using it. The problem is, I can't seem to find any good tutorials on how to use ice4j, and the Javadoc I compiled from the source code doesn't seem to help either. I don't want to resort to having to read through all the source code, because that would be annoying. Is there anything that can help me learn ice4j?


Source: (StackOverflow)

Handling network changes during an active session

I am experimenting with WebRTC. What happens to an existing call, when network state changes? For example a client on cellular network, moves towards wifi. As call drop is not expected in these cases, what measures should be taken for providing seamless calling experience ?


Source: (StackOverflow)

JSTUN vs PJNATH

I'm going to be writing my own STUN implementation in JavaScript (server-side with NodeJS), and I'm looking for a library to base my code on.

I have found both JSTUN and PJNATH, and both seem to be supported by members of stackoverflow. I downloaded the source for both, and PJNATH was about 15,000 lines of code whereas JSTUN was less than 3000.

Is one library more complete than the other?

I need both server and client components, and I would like to be as feature-complete as possible because I do NOT want to implement TURN (too hardware intensive).

Is there a better library that I should be looking at? Ultimately I want to make a completely ICE complient solution, but STUN is enough for now.


Source: (StackOverflow)

Django, how to generate an admin panel without models?

I'm building a rather large project, that basically consists of this:

Server 1: Ice based services. Glacier2 for session handling. Firewall allowing access to Glacier2.

Server 2: Web interface (read, public) for Ice services via Glacier2. Admin interface for Ice services via Glacier 2.

The point I'm concerned with is the web interface. I want to use Django, because it's both written in python and has that incredibly useful automatic admin panel generator.

The web interface doesn't access any database. It connects to an Ice service on Server #1 via the Glacier2 router and uses the API exposed by those services to manipulate data.

And as you probably know, the admin generation in Django depends on the use of Django's ORM; which I'm not using since I have no database to access.

So I need to generate the admin panel, but, instead of having an standard data access like the ORM normally does, I need to intercept any "db-access" calls and transform them into Ice service calls, and then take the service's output (if any), transform it into whatever the ORM normally returns and return control to Django.

Anyone knows how I could do this? what would I need to subclass? Any specific ideas?

Thanks for your time.


Source: (StackOverflow)

Android ICS HTTP POST

I know this question has been asked many times. I have searched the forum as well, but was unable to find the answer I am looking for.

the code works on many android version, but doesnt work on version 3.0 or above. String response_from_server = null;

    // Create a new HttpClient and Post Header
    HttpClient httpclient = new DefaultHttpClient();
    HttpPost httppost = new HttpPost(file_n_folder.URL_POST);

    //Log.d("URL",file_n_folder.URL_POST);

    try {

        JSONArray postjson = new JSONArray();
        postjson.put(obj);

        // Post the data:
        httppost.setHeader("json",obj.toString());
        httppost.getParams().setParameter("jsonpost",postjson);

        // Execute HTTP Post Request
        HttpResponse response = httpclient.execute(httppost);

        // for JSON:
        if(response != null){

            InputStream is = response.getEntity().getContent();

            BufferedReader reader = new BufferedReader(new InputStreamReader(is));
            StringBuilder sb = new StringBuilder();

            String line = null;
            try {
                while ((line = reader.readLine()) != null) {
                    sb.append(line + "\n");
                }
            } catch (IOException e) {
                e.printStackTrace();
            } finally {
                try {
                    is.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            response_from_server = sb.toString();

            //Log.d("RESPONSE FROM SERVER",response_from_server);

            return response_from_server;
        }

    }catch (ClientProtocolException e){
        Log.d("EXCEPTION line 94",e.getMessage());
    }catch (IOException e){
        Log.d("EXCEPTION line 96",e.getMessage());
    }
    return response_from_server;

It always crashes the application on httpclient.execute(httppost);

can you guys please suggest me, what or how to fix this?

Thanx


Source: (StackOverflow)

What are ICE Candidates and how do the peer connection choose between them?

I newly wrote a simple chat application, but I didn't really understand the background of ICE Candidates.

When the peer create a connection they get ICE Candidates and they exchange them and set them finally to the peerconnection.

So my question is, where do the ICE Candidates come from and how are they used and are they all really used???

I have noticed that my colleague got less candidates when he executes the application on his machine, what could be the reason for different amount of Candidates?

Thanks for Comments...


Source: (StackOverflow)

ICE, STUN, TURN library for iOS iPhone

I need to establish a P2P UDP and TCP Connection between two Users. Both of them are behind a NAT. A little research leads me to STUN, TURN and ICE.

  1. Is there any open source iOS (library) which support the same?

  2. FaceTime in iPhone also uses ICE, STUN, TURN to NAT traversal, so does iOS SDK exposes such API's?

  3. I found nICRr code in resiprocate source code (www.resiprocate.org), which I am able to test on Mac OS X for STUN part. Did anybody tried using the same for iOS 4.0or above?

Thanks, rodney


Source: (StackOverflow)

How much improvement should one expect to see using trickle-ICE vs ICE only

Just read this article, which made me curious to know about the benefits in terms of speeding up the negotiation phase. I'm developing an application, where I'm using a third-party util that makes use of ICE-only, but eventually will upgrade to trickle ICE in the next version. The upgrade would require quite some code refactoring, so I would like you to share any experiences/benchmarks on this subject.


Source: (StackOverflow)

DTLS handshake not completing - ORTC prototype

Firstly - apologies as I can't add ORTC tag as I don't have enough rep, so adding webrtc for now. I have been experimenting with the ORTC prototype, but I have unfortunately hit a stumbling block :(

I have a very similar test application to the following, using the ORTC prototype plugin and javascript code: http://ortc.org/wp-content/uploads/2014/08/ortc.html#rtcicetransportcontroller-example1* however I have just a single ortc.RTCIceTransport and ortc.RTCDtlsTransport object at the moment.

I have ICE completing against a C++ test application, but I am unable to either receive a Client Hello DTLS packet, nor am I able to get any responses to my Client Hello packets after ICE completes. DTLS claims to have completed as the console logs it's in the connected state, but I'm dubious as I see no packets on the wire!

...or is it the intention that the DTLS handshake starts when I do:

// Set the audio and video send and receive parameters.  
audioSender.send(audioSendParams);
audioReceiver.receive(audioRecvParams);

?

My test application works fine against the Firefox and Chrome ICE and DTLS stacks. I can post some/all of the javascript below if that would help, but I'm just wondering if anyone has seen (and/or fixed) similar issues with the ORTC prototype code.

Thanks in advance


Source: (StackOverflow)

ZeroC Ice demo failing

Note: I tried to post on their forum but was apparently not allowed so I went here.

I'm trying to get ZeroC Ice demos to work but I'm running into a problem. I get this while trying both the C# and C++ demos.

Compiling works fine but when starting the server and client, nothing happens. I have narrowed the cause down to the function ice_isA() which is called inside checkedCast(). When this function is called nothing happens, ie. nothing is returned and no error is raised, the debugging stops and the program does nothing.

What may be the cause of this?

This function is the first function called from the Ice library so it may as well have nothing to do with that specific function but instead something with my setup. I run this on Windows 8 Dev Preview (essentially the same as Win 7 x64) with Visual Studio 2010 professional. The included Visual Studio 11 is uninstalled as it caused other problems.


Source: (StackOverflow)

How to add unencrypted framing header in front of encrypted payload (using Sslstream)

I am busy implementing ICE-TCP (RFC 6544 http://tools.ietf.org/html/rfc6544) using C# and .NET Framework 4.5. However, I am facing a very tough issue related to the protocol layering which is as follows.

ICE-TCP RFC says:

„ICE requires an agent to demultiplex STUN and application-layer traffic, since they appear on the same port. This demultiplexing is described in [RFC5245] and is done using the magic cookie and other fields of the message.
Stream-oriented transports introduce another wrinkle, since they require a way to frame the connection so that the application and STUN packets can be extracted in order to differentiate STUN packets from application-layer traffic.
For this reason, TCP media streams utilizing ICE use the basic framing provided in RFC 4571 (http://tools.ietf.org/html/rfc4571#section-2), even if the application layer protocol is not RTP.“

The framing method looks like this:

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
 ---------------------------------------------------------------
|             LENGTH            |  RTP or RTCP packet ...       |
 ---------------------------------------------------------------

I also want to use TLS in my implementation and the ICE-TCP RFC says:

„When Transport Layer Security (TLS) or Datagram Transport Layer Security (DTLS) is used, they are also run over the RFC 4571 framing shim, while STUN runs outside of the (D)TLS connection. The resulting ICE TCP protocol stack is shown in Figure 1, with (D)TLS on the left side and without it on the right side.”

Finally the ICE TCP stack looks like this:

                   +----------+
                   |          |
                   |    App   |
        +----------+----------+     +----------+----------+
        |          |          |     |          |          |
        |   STUN   |  (D)TLS  |     |   STUN   |    App   |
        +----------+----------+     +----------+----------+
        |                     |     |                     |
        |      RFC 4571       |     |      RFC 4571       |
        +---------------------+     +---------------------+
        |                     |     |                     |
        |         TCP         |     |         TCP         |
        +---------------------+     +---------------------+
        |                     |     |                     |
        |         IP          |     |         IP          |
        +---------------------+     +---------------------+

So I’m interested in the left side of the figure. The figure implies that the framing header is outside of the TLS encryption and I have to write the header unencrypted to the stream.

Currently my application uses the SslStream Class wrapped around the NetworkStream which I get from my TCPClient. My first intention was to write the framing header into the NetworkStream and afterwards write the encrypted application data to the SslStream. After some research I found this:

“After AuthenticateAsClient/Server, your connection will be SSL secured. Don't call the Socket or NetworkStream methods then: this will break the SslStream.“ Source: C# Sockets and SslStreams

So I can’t write to NetworkStream once the SSL connection is established.

My question is: Is there a way to “put” the header between TCP (NetworkStream) and TLS (SslStream)?

Thanks in advance.

Best regards

Markus


Source: (StackOverflow)

C++ Exception not caught (Qt Project)

My problem is the following:

There is a shared library called Interface.so which is based on ICE (Internet Communication Engine) and something like a wrapper for frequently recurring tasks. One of these tasks is to register for a topic (similar to an id). In case, this topic does not exist already, ICE throws an exception called NoSuchTopic.

If I use Interface.so with a stand-alone Qt application it is possible for me to catch the NoSuchTopic exception and create the topic in the catch block (the catch block resides in Interface.so). But I want to do the same in a plugin for a flight simulator, which is itself a shared object - and here the exception is not caught by the previous mentioned catch block in Interface.so. Instead, the flight simulator crashes stating

 terminate called after throwing an instance of 'IceStorm::NoSuchTopic' 

nm -C -D says that 'IceStorm::NoSuchTopic' is undefined in Interface.so. Is this ok? Or should there be a reference where to find the definition? I already added the entry for libIceStorm.so (libs += -lIceStorm) where IceStorm::NoSuchTopic is defined (according to nm) but that does not change anything!

I also tried '-Wl,-E' but I don't know if I set this option correctly in Qt Creator. Would this help at all?

I would be grateful for every hint.


Source: (StackOverflow)

Windows GUI and native C++

I'm making a student project called "C++ Game Development". It's a card game with client and server. Client application contains few windows which I've already made with Windows Forms in Visual Studio 2013. For client/server communication I decided to use Internet Communications Engine (ICE). During Build in client's project I had errors in auto-generated code by ICE. I found that ICE doesn't support C++/CLI, only native C++ or C# (that I can't use).

So now I am at a crossroads, whether make the whole client application in native C++ (that means for ex. use MFC which I'm not familiar with) or use both native C++ and C++/CLI (put the work I've done with Windows Forms to CLR Class Library and link to it from native C++ project with entry point) which is also not trivial.

I'm trying to choose the less time-consuming option. I'm asking to help me estimate the complexity of these approaches. I like the second much more but I'm not sure it's the easiest.


Source: (StackOverflow)