Web Connection
Socket support in Web Connection
Gravatar is a globally recognized avatar based on your email address. Socket support in Web Connection
  Jim Monte
  All
  Apr 11, 2021 @ 11:52am

So since WC now supports Socket stuff.. I take it we can build a peer to peer WebRTC app using WCs socket stuff to handle signaling? I made a Video/Chat App using node for the signal server... I'd rather have it in my WC/IIS stuff... I'd just use WC sockets to handle signaling and not the actual chat.. Would use WebRTC to handle Video and chat.. Has anyone tried to do anything like this in WC yet?

Gravatar is a globally recognized avatar based on your email address. re: Socket support in Web Connection
  Rick Strahl
  Jim Monte
  Apr 11, 2021 @ 12:20pm

I think so yes. Both ends need to be able to use WebSockets for this to work though with the WC server as the hub in the hub and spoke model.

We've been able to do this for some time, if you previously wanted to use some alternate technology for the server bit - (ie. .NET with a SignalR server, or Node for as you're doing). Now you can use Web Connection too... but it's a less flexible model. You don't have as much control as a full solution like SignalR or SocketIO, but still it works for many common scenarios. Before you jump in with production work (especially if you come from an existing framework) make sure you test your scenarios out first.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Socket support in Web Connection
  Jim Monte
  Rick Strahl
  Apr 11, 2021 @ 12:40pm

I only need to Send / Receive SDP "Session Description Protocol" it's just a few hundred chars of text describing what each peer is capable of.. so I think it will work fine... This new socket stuff in WC opens up many new features I can add to my existing apps...

Thanks Rick!!!

Gravatar is a globally recognized avatar based on your email address. re: Socket support in Web Connection
  Jim Monte
  Jim Monte
  Apr 11, 2021 @ 01:14pm

When you first came out with this latest Version 7.20.. Seems like the Chat demo wasn't working right... looks like it is working fine now.. I'm going to play with that code to send / receive SDP messages.. Once local and remotes have each others information.. it should be as easy as send the video streams.. When will you have a sample on this.. lol.. joking..

-- Jim --

Gravatar is a globally recognized avatar based on your email address. re: Socket support in Web Connection
  Rick Strahl
  Jim Monte
  Apr 11, 2021 @ 05:18pm

Yeah when I pushed the demos up, I forgot to enable WebSockets on the site. Duh 😄

The chat demo is very rudimentary of course, basically just demonstrates the broadcast mode - doesn't show previous message or chat room groupings etc. so very simplistic, although it's possible to do all that if you track users through their sessions.

Be interesting to see what people build on top of this.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Socket support in Web Connection
  Harvey Mushman
  Jim Monte
  Sep 17, 2024 @ 04:00am

Hi Jim,

Just wondering if you ever got Signaling to work in Web Connection? I'm in the process of trying to create a Raspberry Pi WebRTC host and trying to figure out what the easiest way to setup the SDP conversation that needs to take place.

Any suggestions or thoughts about what you learned would be appreciated.

Best,

Gravatar is a globally recognized avatar based on your email address. re: Socket support in Web Connection
  Rick Strahl
  Harvey Mushman
  Sep 17, 2024 @ 07:41am

There are .NET libraries that provide these clients and you can probably hook up to those from Foxpro using wwDotnetBridge...

Here's one:

SipSourcery

There are also various .NET Web Sockets implementations available (including the native System.Net.WebSockets) that let you communicate across desktop -> Web app and then perhaps handle the WebRTC stuff in JavaScript with the many tools and examples available there.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Socket support in Web Connection
  Harvey Mushman
  Rick Strahl
  Sep 17, 2024 @ 10:45am

Ah... this will make for an interesting Q&A next week at SWF where a beer at the bar will give me a chance to hear more! Looking forward to your VFP Session on .NET interface.

BTW - I looked at the link you provided, I am trying to keep the JavaScript application as simple as possible and from what I have read so far introducing SIP into the project will only add functionally I really don't need.

The final project will be a Raspberry Pi, that when it received a switch closure on a GIO pin a Node-Red application will kick in. The event will trigger an MQTT message to be published with the body of the message providing a link to the RPi where a static html page will include a WebRTC client that is connected to the RPi's microphone, speaker and camera. Once the video and audio are active the user will be able to receive the video and send and receive audio from the RPi (the RPi will not get display video).

The Node-Red application will also be able to control other functionally on the RPi such as opening relay(s) and selection local audio files to be played through the local speaker. At the end of the day, the application will make up a very configurable doorbell/access control device.

Gravatar is a globally recognized avatar based on your email address. re: Socket support in Web Connection
  Rick Strahl
  Harvey Mushman
  Sep 18, 2024 @ 07:52am

Yeah I have no idea about WebRTC, so don't ask me about that. All I'm saying is that perhaps you can send WebSocket connections to something on the device and then proxy the messages from the with whatever the easiest WebRTC interface is.

I'm pretty sure though that if you want to control WebRTC directly there's gotta be a .NET client that can do that and then you can use wwDotnetBridge to interface with it (or write some .NET code and then interface that with FoxPro).

+++ Rick ---

© 1996-2024