Anybody implemented IceLink in Xamarin? - xamarin

I am going to develop an application which includes Audio/Video/Text chat.
I read IceLink documentation and demo. From that what I understood is we need to do signalling using WebSync to connect two peers.
But I couldn’t understand how to do it.
My questions are (suppose A wants to call B):
1. How A knows the address of B (whatever it may be like, ID or anything)
2. How B comes to know that A is calling him/her

We once build an App with P2P Connection via IceLink.
But we didn´t use the WebSync Component.
To establish a RTC Connection you need a non-P2P communcation to do the Handshake first.
With this Handshake all neccessary information is transmitted, and icelink can try to reach the other peer.
We used Microsoft SignalR for that since it is a serverside-javascript which can push messages to connected clients.
1.this is part of the handshake
2.Signaling via SignalR (e.g.)

I followed their example and achieved the same thing as you are intending to.
You need to handle call making on the server-side and somehow communicate the session id to another user . as simple as that.

Related

Websocket server that receives the command and sends it back to all connected clients

I would like to create a websocket server that receives the command and sends it back to all connected clients. Basically, it makes the programs able to communiciate with each other. Can you tell me where to begin?
Well there are many implemented solutions for that which provide the implementation like socket.io, Firebase Real time database, signalr and many other.

Elixir websocket/channel basic usage

I'm working on a PoC of a system where a mobile app client needs to be connected on a server with communications going both ways : either for updating the server or being updated by it. There is no client-to-client communications for the moment.
The client logs in the server via an HTTPS/POST method and gets back a token if the credentials are OK. This token is to be used by any further communication in order to authenticate the user. The reason why I'm using HTTPS for logging in is that there also is a web interface for other purposes.
I could not find a tutorial or documentation that explains how to implement this use case with channels based on websocket transport. All I found so far are either partial and focus on some specific aspects (eg authentication, setting SSL/TLS, etc) and assume the reader already knows the rest or are the over simplified implementations of the chat app. I'm sure I'm not looking at the right place...
My questions are:
What would be the list of callback to implement this use case on
either side
On the server: how does a process send notifications to the
client
NB: I'm using Elixir 1.5.1 and Phoenix 1.3
From the Phoenix guide:
Each Channel will implement one or more clauses of each of these four callback functions — join/3, terminate/2, handle_in/3, and handle_out/3.
The page I linked contains also an MCVE of sockets running on Phoenix. In the bottom there are examples of how the server-client communication is done.
The only thing to apply this to your use-case would be to use one of authentication libraries (e.g. Überauth that comes with great examples) to handle token on each subsequent connection request.

Reflect one client's message to another client on Websocket (golang)

I'm having a problem using websockets in my backend. I have to re-write some old with golang and old developer using websocket while one client tracking other client's location.
both client connecting websocket with given url
"\(URLConstants.webSocketURL)?token=\(token)&jobId=\(jobId)"
So I thought both client connecting websocket with her/his own token and I need to reflect user's message to other user. I can open two sockets with given url.
It's the first time that I'm using websocket so I'm not sure I'm asking the right question.
You need to send the information to the existing sessions that you stored from opened connection and distribute the information to other users.
Try to go through this solution to get some inspiration https://github.com/suricatatalk/core/blob/master/core.go.

Websockets "multicasting" PHP

Me and my friend having a little bit of a problem using websockets, I'll quickly explain so we maybe could get it working.
We got a websocket server up and running and its doing fine, lisening to a specific port and connects all our clients as it should.
But we would like to have channels. For an example: http://www.example.com/channel/682831
And we can't figure out how to solve that, because right now its like "broadcasting" and we would more likely have "multicasting"
where we could say this message is going there and this message is going here.
So please help us.
Thanks!
WebSocket provides point-to-point raw messaging. What you describe usually runs under the term "Publish & Subscribe".
A subscriber signals it's interest in a topic, publisher send events to that topic, and a broker dispatches events to the right clients based on a book of subscriptions it maintains.
This needs to be layered on top of WebSocket. You might have a look at WAMP, an open standard WebSocket based protocol that provides Publish & Subscribe (as well as Remote Procedure Calls).
Disclosure: I am original author of WAMP (now an open community effort) and work for Tavendo.

How do I get a Faye client given a client ID?

Faye allows you to monitor various events, such as handshake or subscribe. These callback blocks are only supplied the client_id value rather than the client itself. For example:
server = Faye::RackAdapter.new(mount: '/faye', timeout: 45)
server.bind(:handshake) do |client_id|
puts "Received handshake from #{client_id}"
end
How can I access the client given the client_id? Or how can I access more information in the handshake, such as cookies provided in the request header (if that info is even available)?
I think my original question is based upon a lack of understanding on how Faye works in two regards. Instead of deleting my question, I'm going to answer it for anyone else who comes across this with a similar question. (If my answer is wrong in any way, please comment or edit!)
First, at no point is access to the connected client available due to the way Faye is implemented with regards to the Bayeux protocol. All communications are carried out via channel broadcasting, meaning all connections listening to a channel will receive the message being sent.
Second, the code I pasted in the question deals with monitoring. What I'm really looking for is an extension.
In order to achieve authentication given my original question, I need to pass whatever authentication value is needed (whether it's a cookie value, auth token, etc.) as part of the message['ext'] value (per the example on the extensions page). Then, on the server side, I need to listen for messages on the /meta/handshake channel, setting message['error'] to some value in the case of value.

Resources