How to connect to CometD server using Objective-C - objective-c

I need to connect to a CometD server using Objective-C from an iPhone, and stream data. What is the best way or is there a tutorial or tips?

Related

React Native - Connecting to remote WebRTC stream

We have mobile application that historically has used RTSP streaming to allow a user to watch a live stream, which currently is published via Wowza Streaming Engine. We have had a need to lower stream latency, so have gravitated towards WebRTC to achieve this.
The problem is that there seems to be a lack of documentation, or examples regarding the implementation of a react-native WebRTC viewer which connects to a remote stream.
Does anyone out there have any documentation, or code examples for this kind of implementation?
I do note there is a react-native-webrtc library, however, all examples demonstrate connecting two peers on mobile phones with their video cameras i.e. Like facetime. We are after an example demonstrating someone on a phone connecting to a remote streaming server with a video feed.
Cheers,
If you want a webrtc client to connect to a server you need a server doing webrtc with the proper signaling that fit your need. Webrtc don't care which signaling you use, so you have to choose it or choose a the platform you need.
There are a lot of different media server, or library that support webrtc in server side all having there specific signaling(ex: Freeswitch, Kurento etc), or no signaling (ex: Mediasoup). Few will have a react native version as Media Streaming is not really something in the javascript/UI side but you can do something with the webrtc react-native lib.
Twillio has a lot of supported platform and could be a good start if you search a ready to use solution.

How to connect esp32 and esp8266 with redis database as client

i am trying to run redis server database on RPi3 M-B and want to connect esp12N (esp8266 based) and esp32 with the database as client.
Also suggest me if any other database other than redis which is supported in both raspberry pi as well as esp32/ esp8266.
Thanks in advance...
There's a redis library for the ESP8266 using the Arduino SDK available at https://github.com/remicaumette/esp8266-redis
You can find libraries like this very easily by searching Google for things like "redis library esp8266". You can also find it by searching the Library Manager in the Arduino SDK, or searching Platformio's libraries.

Can you connect to a database with just HTTP?

Awhile ago I was looking around for SQL connectivity with my embedded devices and people recommended not to use ODBC because it would not be able to maintain a constant connection if it were wifi etc. So they recommended I just connect using HTTP requests for data-entries etc. So is this possible and if so what do the requests typically look like?
Btw I would use SSL/TLS for encrypted connection because plaintext over the internet is a nono.
Also this would help because all I have learned was microsoft's ODBC library and I relied on it a lot because now I don't know how to connect to MySQL database from Linux as I have not seen a C++ odbc library, so learning the HTTP way would make it more universal.

Server as WebRTC data channel peer

Are there currently solutions where your server can act as the peer of a WebRTC connection?
The reason I am interested in WebRTC is not the peer-to-peer part of it, but because it enables you to use UDP. You could let players participate in a fast-paced game like Quake without needing any plugins.
It seems that essentially this same question was asked before, but surely things must now be quite different as 2 years have passed.
Yes, it is possible to deploy your WebRTC peer code on server. But since you need to run it on server, it's essentially different from how you run the WebRTC code within the browser - i.e. through a Java Script.
For server based WebRTC peer, you would need to use the WebRTC native code available on platforms - Windows, Mac OS X, Linux, Android and iOS. You can get the WebRTC native code from - https://webrtc.org/native-code/development/
Follow the instructions here to download and build the environment. Sample applications are also present in the repository at the locations - src/webrtc/examples and src/talk/examples
In summary you have use the WebRTC source code that is embedded in the browser in your application code and call the relevant methods / API for the WebRTC functionality.
I have answered similar question at: WebRTC Data Channel server to clients UDP communication. Is it currently possible?
We have implemented the exact same thing: a server/client way of using WebRTC. Besides we also implemented data port multiplexing, so that server would only need to expose one data port for all rtcdata channels.
Here is 2018 update for you: your off-the-shelf solutions are:
Red 5 Pro, Wowza, Kurento, Unreal Media Server, Flashphoner
Also note that in modern public networks TCP is not much slower than UDP;
but UDP may have a considerable packet loss, so try WebRTC-TCP for your Quake idea.

Objective-C RTMP connection

I am looking to make an app that would send data to an RTMP server, however I am looking to write my own code to connect but I can not seem to find the right class to use. NSURLConnection I don't think is capable of connecting to a rtmp server. Mainly I am asking if anyone could link me either some example code or some reading or point me in the right class to use to make a rtmp connection.
Thanks!
Charlie
There is at least two ways to connect to an RTMP server in Objective-C :
You can try the rtmp-wrapper, it uses the library librtmp
Or you can try to build an AIR extension that implements a connection to the RTMP Server and communicate with it, here is explanation on how to do this : http://www.adobe.com/devnet/air/articles/transferring-data-ane-ios-pt1.html,
I hope it will help. Tell us if you succeed connecting to the RTMP server, I think your feedback could be interesting!