Is it possible to communicate with SignalMaster webRTC signaling server using C# - c#

My company as a signalMaster signaling server install at https://signaling.mycompany.com
https://github.com/simplewebrtc/signalmaster
We have a web page that uses simpleWebRTC to communicate with it.
I am working on a .net Application that need to be able to connect to the signaling server in order to see the offers and send answers in order to initiate a peer communication to receive video.
How can this be done ? I can't seem to see any documentation for signalMaster either with the supported commands.

Related

How to implment a GCM Server in C# that supports CCS

I'm trying to write a 3rd party server application for sending and receiving notifications from Android devices using GCM's CCS as outlined here. I'm leveraging PushSharp for handling the sending of notifications from my server app, but I can't seem to find any documentation on how to receive messages at the server level. Is this supported or is there another 3rd party XMPP library for .NET that handles this cleanly?
I dont think you can receive messages at server level, this is not the point in push notifications. if you want to send information to the service from the app, i would suggest writing a webservice. i've implemented this myself, and had to do a little digging to find some code that could communicate with the webservice as it was written in c# and the app was java, but i can paste some code that might help if you think that would help you communicate.
Long story short though, if you want an app to talk to a server, then write a web service. if you want a server to talk to an app, use push notifications.

Communication between Desktop Application and Windows Mobile Compact Framework c#

I am writing a desktop application that will have to communicate with a windows mobile application in the compact framework 3.5. The communication must occur over the internet between these two applications to send data between them on command if the connection is available.
The system will send messages and objects like Images between device and desktop application and check to see if the desktop can see the device by sending a command and have a timeout on response. (Application will then know that the device is not available).
The mobile device will send a message to the desktop application when online as well that the desktop knows that the mobile is connected(Type of registering for communication)
Can someone please inform me of the best way to follow to accomplish this.
I did some research and found this site is near to something like event based driven communication I would want but do not have the availability of setting up an email on each device.
Battery life and internet open on device is not an issue.
Should I check in on working with the System.Net.Socket class for this type of communication between the two application and if so how will I set up so firewalls will not interfere and have my desktop application be seen over the internet by the mobile application ?
Hope someone can spread some light over this for me, if you have a answer please provide a link so I can read up on it.
your description is something basic. OK, regardless of what TCP/IP communication you decide for (HTTP, sockets) you must always have your internet router forward packages on a specified incoming port to your PC and the firwall must accept these incoming requests.
So, the device will have to send data to the PC and vice versa. So you need a server and a client on the PC and on the PC.
Possibly you can use an already available cloud like Dropbox to exchange files between PC and device.
What are about your skills in socket programming? The main server (PC) must be written multithread to be able to server multiple device client requests.
A simple socket comm is done in my SocketWedge [http://www.hjgode.de/wp/2010/05/27/transmit-data-from-winmo-device-to-pc-socketwedge-and-socketsend/]. A way of multithreaded communication using a web server on the device is available here [http://www.hjgode.de/wp/2012/10/19/windows-mobile-a-simple-web-server-with-extended-features/].
Will SQL with data synchronization be a possible choice?
Can you describe the application in more detail?
~josef

Instant Server-Client Communication, C#?

I have been doing research for a few months now on the possibility of client-server communication. I have experimented with many methods such as WebORB and FluorineFX, which are both servers designed to deal with client/server authentication.
WebORB only runs on Windows for their .NET version as far as I can tell, and I would much rather use an open source system. I have tried using FluorineFX, but I think their must be a simpler way for me to build my own simple system from the ground up.
I have been using Dropbox for a while now, and I like the way that the client-server communication is instant. As far as I can tell (from some Google searches) the client doesn't open a port of its own, and just communicates with the Dropbox server through port 80. An example of its instant communication is where you may delete a file on Dropbox on their website, and instantly the server communicates with the client telling it what has happened. I don't know how this instant communication is possible without opening a port.
I can create a system that uses fetching from the client, asking the server every 10 seconds or so to see if there are any updates, but I would like a method to be able to push the information from the server to the client.
My server runs Linux so I don't think I can use WCF, and ideally I am looking for a way to make PHP and C# communicate with each other.
I would love to hear any advice that anyone has and how they deal with the problem.
Cheers.
You CAN use WCF to communicate with any platform. Just make sure you're using an endpoint which your target machine support: http://msdn.microsoft.com/en-us/library/ms733107.aspx
Have you tried the good old .NET Remoting which runs perfectly with Mono?
You can choose between a TcpChannel (for performance) and a HttpChannel (to pass proxy/firewall easily).
For push notifications, you can open a connection to your server and wait for an answer indefinitely.

Can Silverlight use the LAN without an internet connection?

I understand that trusted silverlight applications can communicate with each other over the LAN connection (peer to peer). Can they do this without an internet connection once installed out of browser? Do they need to first download some sort of Access Policy?
If not, is there some alternative way of doing this, perhaps with some kind of helper service on the computer?
Can they use similar techniques to talk to Local non-Silverlight devices, e.g. could a trusted silverlight application talk to an iPhone app over a local area network?
System.Net.Sockets.UdpAnySourceMulticastClient
Does allow you to connect between Multiple Silverlight applications on the same LAN. It does not require any internet connection after the application is installed out of browser.
I'm not clear if this could be used for communication with non-Silverlight applications althouh I believe it probably could since UDP Multicast is a standard protocol.
In situations where the network infrastructure is older it may not support UDP Multicast addresses. In this case, the best solution would be to install a separate local server on one of the client machines, to which all other silverlight applications could connect (once the user had typed in the IP address).
I'm not sure where you got your information from but as far as I'm aware there is no builtin way for Silverlight applications to connect to each other peer-to-peer. However it is possible to place a simple server application on the LAN through which Silverlight applications running on different nodes can communicate.
The plumbing needed to create peer-to-peer pipes is missing from Silverlight. It only has a means to connect to a specific TCP/IP port or to listen to Multicast UDP sources, it can't create a Listening port that waits for a connection nor generate UDP output.
You could go this by calling COM objects from Silverlight, however
Just because you can hammer in a nail
with a screw driver, does not make the
screw driver the best tool for the
job.
Have a look at using WPF so you get the full .net framework.

How are server side applications created, how is client - server communication done?

I would like to have a client-server application written in .NET which would do following:
server is running Linux
on the server there is SQL database (mySQL) containing document URLs
What we want:
- server side would regularly crawl all URLs and create a full text index for them
- client side would be able to perform a query into this index using GUI
The client application is written in .NET using C#. Besides of searching in documents it will be able to do a lot of other things which are not described here and which are done client-side very well.
We would like to use C# for the server side as well, but we have no experience in this area. How are things like this usually done?
Clarifying question now based on some answers:
The thing which is most unclear to me is how client-server communication is usually handled. Is client and server usually using sockets, caring about details like IP addresses, ports or NAT traversal? Or are there some common frameworks and patters, which would make this transparent, and make client-server messaging or procedure calling easy? Any examples or good starting points for this? Are there some common techniques how to handle the fact a single server is required to server multiple clients at the same time?
To use c# on Linux you will need to use Mono. This is an open source implementation of the CLR specification.
Next you need to decide on how to communicate between server and client, from the lowest level of just opening a TCP/IP socket and sending bits up and down, to .Net remoting, to WCF, to exposing webservices on the server. I do not know how compleat WCF implementation is on mono, also I think you may have issue with binary remoting between mono and MS .Net .
I would suggest RPC style WebServices offer a very good solution. WebServices also have the advantage of alowing clients from other platforms to connect easily.
EDIT
In response to the clarification of the question.
I would suggest using mono/ASP.NET/WebServices on the server, if you wish to use c# on both server and client.
One assumption I have made is that you can do a client pull model, where every message is initiated by the client. Using another approach could allow the server to push events to the client. Given the client has the ability to pole the server regularly I don't consider this much of a draw back but it may be depending on the type of application you are developing.
Mono allow execution of c# (compiled to IL) on a Linux box. Mono ASP.NET allows you to use the standard ASP.NET and integrate into Apache see http://www.mono-project.com/ASP.NET and finally WebServices allow you to communicate robustly in a strongly typed manner between you client and your server.
Using this approach negates most of the issues raised in your clarification and makes them someone else's problem.
Sockets/SSL - is taken care of by standard .Net runtime on the client and Apache on the server.
IPAddress/ports/NAT traversal - Is all taken care of. DNS look up will get the servers IP. Open socket will allow the server to respond through any firewall and NAT setup.
Multiple Clients - Apache is built to handle multiple clients processing at the same time as is ASP.NET, so you should not encounter any problems there.
As many have already mentioned there are a number of thing that you have mentioned which are going to cause you pain. I'm not going to go into those, instead I will answer your original question about communication.
The current popular choice in this kind of communication is web services. These allow you to make remote calls using the HTTP protocol, and encoding the requests and responses in XML. While this method has its critics I have found it incredibly simple to get up and running, and works fine for nearly all applications.
The .NET framework has built in support for web services which can definitely be called by your client. A brief look at the mono website indicates that it has support for web services also, so writing your server in C# and running it under mono should be fine. Googling for "C# Web Service Tutorial" shows many sites which have information about how to get started, here is a random pick from those results:
http://www.codeguru.com/Csharp/Csharp/cs_webservices/tutorials/article.php/c5477
have a look at Grasshopper:
"With Grasshopper, you can use your favorite development environment from Microsoft® to deploy applications on Java-enabled platforms such as Linux"
Or see here
The ideea is to convert your app to Java and then run it on Tomcat or JBoss.
Another approach: use the Mod_AspDotNet module for Apache, as described here.
This Basic Client/Server Chat Application in C# looks like a kind of example which might be a starting point for me. Relevant .NET classes are TcpClient and TcpListener

Categories