I'm doing a project of mediasoup with swift. The mediasoup server is using protoo server. But there is no protoo client on swift. I tried to use WebSocket. It also fail. Is there any way to connect protoo server on swift?
Related
I am using Apprtc library for the real-time connection.
this is my server host URL #"https://appr.tc". Connection successfully established to any network, but in the audio/video sense
audio/video only works on same/private network iOS to iOS or iOS to Android
in public network audio/video only work in iOS to Android , Not working iOS
device to iOS device .
do you have any idea ?
TL;DR You need to bring up a TURN server, and configure the client with the addresses of your TURN server.
WebRTC attempts to connect two peers directly, but that's not always possible in all network configurations (e.g. when both sides are behind a NAT or a Firewall). In these cases, WebRTC will fallback to using a TURN server. It's basically a server that both peers can connect to, and it forwards packets from one to the other.
I am working with socket io using AppCoda this Tutorial. connect to socket server using node.js and swift, working fine , But it was group chat if we send the message it is showing to all users available in the socket . But How can we send messages one to one I am using socketio/socket.io-client-swift till now I can able to connect the socket after that what I will follow to create one to one chat.
As per my search we need to create a chatroom for two persons,But I am not sure Please let me know.
I need to connect to an XMPP server over websocket on iOS (ws://chat.something.com:1234/websocket). I am using XMPPFramework, but I cannot find a way to make it connect over websocket.
I found this answer https://stackoverflow.com/a/23114564/310121 that suggests that XMPPFramework doesn't support this. As far as I can tell, that seems to be true.
So is there any way to connect to an XMPP server over websocket on iOS without writing your own library or extending XMPPFramework (or some alternative library) to support this?
XMPPFramework uses TCP sockets. It has not provided any API's or provision for websockets.
In order to connect with your server using websockets, you will have to alter XMPP Library's code.
I had the same issue, and i resolved it by replacing XMPPStream class of XMPPFramework (that deals with the actual TCP socket connection) with custom stream class, and used SocketRocket library to connect over websocket with my server.
I am trying to use the MQTT protocol and am an amateur with this. I tried the objective-C code over Mosquitto library using MQTTKit (https://github.com/jmesnil/MQTTKit).
I am able to use it to publish messages to some test servers and things are working fine but still I have some basic questions, not so clear to me:
Does Mosquitto library include web sockets too underneath?
Is it possible to create a connection, subscribe to a topic and then server can also publish messages to device with realtime behavior? In other words, can we use it for real time communication between server and client (the iOS device in this case) bidirectional?
The mosquitto library does not support websockets, it is mqtt only.
Yes, mqtt is a bidirectional protocol. I believe there are difficulties with keeping a long term socket open on iOS that mean it isn't as straightforward to support as you might like. I'm not familiar with iOS at all though.
1.the mosquitto library of javascript has support websocket. you can go http://mosquitto.org/download/ to download.
2.mosquitto support MQTT protocol. When the connection was established, the mosquitto will send PINGREQ message for keep heartbeat.(the keep alive time please see MQTT protocol). the MQTT protocol is Publish / Subscribe (PubSub) model.So the server(broker) is central. Client subscribe topic, other client can receive message, and clietn can publish message to the another topic.That's all, you only need to set appropriate topic.
I am trying to connect an iOS device with a server trough TCP. I am currently using the function CFStreamCreatePairWithSocketToHost. My problem is that i want to set the local port that the iOS device needs to use. Is there anyone who has experience with this and could tell me how to do this?
I have found the answer.
I am now using the cocoaasyncsocket library.
Connecting with a host using the function connectToAddress: viaInterfaceAddress: withTimeout: error: gave me the possibility to define my local port.