XSockets.NET TeamBlog

Here Team XSockets provide the latest information about the framework.
You will also find videos and stuff produced by us (and others).

If you have done something with XSockets.NET, tell us and we might post about it here!

News, updates and other information team!

XSockets 2.6 released

Tuesday, May 07, 2013 7:33 PM 0

A minor release pushing us into XSockets.NET version 2.6...

This main reason for this release is that a user of ours found a bug when using Hixie76/Hybi00. Thanks for pointing this out for us Justin Bay!

But... While we were at it we took the chance to improve some other stuff as well.

  • RFC6455
    • Added ping/pong support
  • Architecture
    • Protocols are now plugins for all of you, not only Team XSockets can write protocols.
      Tutorials will be written shortly, if you cant wait. Send us an email :)
  • Server
    • Finetune on the socket listener.
  • Protocol
    • RFC6455, improvements on the ReceieveData method.
    • Moved ProtocolPattern, ProtocolIdentifier and HostResponse into the protocols to provide opportunity for users to create custom protocols.
  • Nuget package
    • Improved setup-logic when installing XSockets into non-webprojects
    • New option on scaffolder for creating long-running controllers
  • Bugs
    • The SetConfigurationSettings method is now working properly.
  • Minor changes/improvements on the External API

Regards

Team XSockets


XSockets 2.5.3 - Releasenotes

Thursday, April 25, 2013 9:24 PM 0

In 2.5.3 we fixed a few minor bugs and some requests from the community.

Improvements/BugFixes

  • External API
    • Added methods to streamline this API with the JavaScript API
    • Added methods for binding to events without the generic action<T>
      This will improve the communication from other languages as powershell for example
  • Nuget Packages
    • Improved when updating (will not add duplicated configs and code snippets)
    • Improved with proper uninstall instructions
  • Extensionmethods
    • Improved for sending string (previously needed to be wrapped in a model)
    • Extension for sending JSON directly, use SendJson, use AsTextArgsForJson to wrap JSON as a regular ITextArgs
  • Certificates SSL/TLS
    • Minor bugfixes and improvements

Regards
Team XSockets.NET


XSockets 2.3 - ReleaseNotes

Wednesday, March 27, 2013 8:38 AM 0

Important: If you get exceptions from the pluginframework, read this!

WebRTC

We now offer an series of new features in XSockets.NET that simplifies and enables an effective way of working with WebRTC application development. It is a combination of a JavaScript abstractionlayer for delaing with local and remote media streams, peerConnections and dataChannels ( Page to Page communication) .

The cornerstore is a new “built-in” XSockets.Controller named PeerBroker , this controller takes care of signaling, peer connections and context brokering and data-channels.

The new JavaScript API for WebRTC enables you to build WebRTC powered applications that also leverages all the other features of XSockets.NET.

We also added a simple call-manager that helps you deal with use-cases around “making a call”.

Configuration

When creating custom configuration you should now have the port included in the Uri. An example is provided when the package is installed. ws://yoursever:port

Certificates (wss/tsl)

We made some changes to the TLS/SSL configuration. CertificatePath and CertificatePassword properties is replaced by the CertificateDistinguishedName i.e cn=localhost, the server will query the certificate store (localMachine).

As an to provide a X509Certificate2 to the Certificate which will overide the CertificateDistinguishedName property.

ActionMethods

In previous versions of XSockets you could only have void on the actionmethods you wanted to expose from your controller. We now provide a few new options.
return object[any serializable object] methodname()

If you have a return type on your actionmethod it will send back the value returned to the client calling the actionmethod. You can send back any serializable object. string, int, List<string>, including custom object ofcourse. And you can as before pass in parameters (one or several) if you want to.

Note: When using return the eventname will always be the name of the method you are in.

Example

public int IntTest()
{
    return 42;
}
//Note that you still can do lots of sending and then end with a return
//This will equal to...
public void IntTest()
{
    this.Send(42,”IntTest”);
}

return to others than the caller

The above example only returns data to the client calling the method, so how to return data to other client by using return?

We introduce a new type called XReply, this can be used as a return type when you want to target who to send the return to.

Note: When using return the eventname will always be the name of the method you are in.

Example ToAll

public XReply ReplyStringToAll()
{
    return “Zebras are nice”.Reply().ToAll();
}
//Note that you still can do lots of sending and then end with a return
//Equal to...
public void ReplyStringToAll()
{
    this.SendToAll(“Zebras are nice”,”ReplyStringToAll”);
}

Example sending with filter

public XReply ReplyStringToSome()
{
    return “Zebras are nice”.Reply().To(p => ((CustomController)p).Age > 18, “MonkeyBusiness”);
}
//Equal to...
public void ReplyStringToAll()
{
    this.SendTo<CustomController>(p => p.Age > 18,  “MonkeyBusiness”,”ReplyStringToSome”);
}

I think you get the concept...

All the reply extension are...
Reply() - Send to caller
Reply().ToAll - Sends to all subscribers
Reply().ToAllExceptMe - Send to subscribers but not my self
Reply().ToOthers - Equal to ToAllExceptMe
Reply().To - Send to clients subscribing but with a condition.

Public Properties

You are probably aware of the fact that teh compiler will create set and get methods for us when we declare properties in C#. You can now access public getters and public setters from JavaScript and the External/Client API.

Server-Side

public MyController : XSocketController
{
    //You will be able to access get and set on this property
    public string Name {get;set;}
    //Only get is accesible here
    public Int Age  {get; private set;}
    //This one is all public, but not accessible due to the NoEvent Attribute
    public string Secret {get;set;}
}

JavaScript

//Set the Name property
ws.trigger(‘set_Name’,{value:’Vinny Jones’});
//Get the Name property
//1: Listen for the get event
ws.bind(‘get_Name’, function(d){
  console.log(d);
});
//2: trigger the get for name
ws.trigger(‘get_Name’);

Cookies

You can now access the clients cookies in your controller.

In previous versions you could access parameters that you pass in to the controller in the connection. Now you can access cookies with the same pattern on the server-side.

if (this.HasCookieKey("nameOfCookie"))
{
    var cookieValue = this.GetCookie("nameOfCookie");
    //do something clever, maybe with the .ASPXAUTH cookie ;)
}

External API

We said that this API would be replaced with a new XSockets.Client API... And we have replaced the old external, but decided to keep the assembly name and namespace to not mess things up to much for you.

The changes in this API was made to be more streamlined with the JavaScript API.
And also to improve speed and reliablility!
Changes in the plugin-framework

Until now you had to have all the plugins in a plugincatalog. In 2.3 we let you work in a way that you probably are more familiar with. By referencing the plugin (and other XSockets assmeblies) in the project starting the server instance the plugin framework will find these assemblies and use them.

You can also have a plugincatalog if you want to since the plugin framework will add these files to (if not already loaded as an assembly).

Nuget Packages

Below we describe our packages and what each of them contain.

XSockets

This is the basic package for getting started with a realtime project. It will install all other packages except for the “Binaries” package.

Dependencies

XSockets.Core, XSockets.Server, XSockets.JsApi, XSockets.Tutorials
Note: Will also install XSockets.Fallback if the project type is ASP.NET MVC

XSockets.Core

The Core package contains assemblies for the plugin framework and the core assemblies of XSockets. Basically all you need to create controllers!

Dependencies

N/A

XSockets.Server

The Server package contains a part of the core but also assemblies for communication, protocols, default controllers and ofcourse the server.

With this package installed you can create an instance of a XSockets server. A simple example is provided in the package.

Dependencies

N/A

XSockets.External

The External package contains API´s for connecting to XSockets from a device/application that talks TCP/IP. This could be anything from WPF to a Kinect device, Powershell etc

Dependencies

XSockets.Core

XSockets.Fallback

The Fallback will be installed automatically when installing the XSockets package in a ASP.NET MVC project. The fallback is actually a MVC controller using the External API to communicate with websockets to the XSockets Server.

So the XSockets fallback (that uses longpolling) actually uses sockets from the fallback.

Dependencies

XSockets.External
XSockets.Tutorials

The Tutorials package is just a set of examples packed into a simple javascript playground.

Dependencies

N/A

XSockets.JsApi

The JsApi contains references to the XSockets javascript API´s.
Mainly a publish/subscribe pattern and the WebRTC API

Dependencies

N/A

XSockets.Binaries

If you only want the latest binaries you will find them in this package. All the assemblies used in the other packages are included here.

Dependencies

N/A

Chocolatey Package

We recently added XSockets as a windows service on chocolatey!
Chocolatey is like a apt-get for windows, making it possible to install XSockets as a service with a simple command.
More info at: http://xsockets.net/api/hosting/windows-service

Dependencies

N/A

Other changes

The Interceptor plugins was removed

XSockets have support for interceptors, and we have always shipped our own. These are now excluded but you can still write your own interceptors for

  • Connection
  • Disconnections
  • Errors
  • Incomming Messages
  • Outgoing Messages

A realtime architecture in minutes

Thursday, March 14, 2013 7:05 PM 0

Using T4 to build a RealTime MVC architecture.

Our demo on how to use XSockets and Codeplanner (nuget) to build a realtime MVC architecture quickly gave us alot of feedback. Thanks for that!

Also there is a lot of people requesting the source code, even though there are not much coding in the demo.. Just T4Scaffolding :)

However, we will ofcourse provide the code for the demo... You can download it from the link below the video!

View/Download Code at GitHub

//Team XSocket


EntityFramework, KnockoutJS and Websockets

Saturday, March 09, 2013 10:02 AM 0

In this video Uffe from Team XSockets shows how to generate a complete architecture with WebSocket controllers, servicelayers, respositories etc. It will also create the database for you.

We will scaffold most of the javascript as well...

At the end we can see one of the advantages with MVC for websockets over traditional MVC.

This scaffolding is possible since the nuget package codeplanner now have scaffolders for XSockets controller, javascript calls etc.


Tutorial - Building a multivideo-chat with WebRTC

Thursday, February 28, 2013 3:35 PM 6

Introduction

In this small tutorial I´ll guide you through the process of building a multivideo-chat based on WebRTC. The API is still under development, but you will be able to download this sample or build it yourself from scratch.

About WebRTC

WebRTC is hot, really hot :) I think that it´s common to think about WebRTC as Video/Audio, but the truth is that it is so much more. You can pass anything peer-2-peer, not only video/audio. This will be useful for us webdevs in many scenarios,think about how often we just want to pass something to another client... We can now do it directly without touching the server.

A little clarification about how things have evolved.

Pre-WebSocket

If I wanted to pass something to another client I had to store it "some how" on the sevrer and then the other client/clients would request the data sometime in the future.

WebSockets

Awesome stuff, where we can say send this value to that client/clients. Easy and really fast... But still through a sevrer.

WebRTC & DataChannels

We can now let the server connect us to other clients and then we send/recieve data directly between peers. In this tutorial we use this tech to send/recieve video/audio, but you can imagine the possibilities in the area :)


Getting started

Note: If you have been using XSockets before or know how it works, then you can skip a few sections and go directly to "Adding WebRTC in the UI"

Also note that you can download the complete example at the bottom of the page

PreReq

  • To follow the tutorial you will need Visual Studio 2010/2012.
  • Use Chrome as default browser in Visual Studio and on your system.

Creating the project

Open up Visual Studio and create a new project named BasicWebRTC.

Installing XSockets

Open up the PackageManager console and write "Install-Package XSockets"

This will install the nessesary files and also give you 2 new projects. One for realtime controllers and the other for starting a server. The details of that is out of scope for the tutorial, and we do not need to do any development in there in this tutorial.

Verify that XSockets is working

Before we go to the next step, lets take the realtime server on a testrun. In the web-project right click on the file default.htm under XSockets/XFiddle and select "View In Browser"

when the page renders in Chrome you will see something like below... Then just click "run" in the upper left corner and the lower right should say "You are XSockets connected".

Adding the WebRTC-controller (included after upgrade to 2.3)

The current version of XSockets is 2.2, but we will not ship the WebRTC controller until 2.3. However you can download the current version of the WebRTC controller from XSockets.NET and just drop it in the plugin directory and it will work. This is the next step in the tutorial. So download the controller from http://xsockets.net/file/xsocketswebrtccontrollers.dll and then add it to the plugin directory, by default the directory is located at "XSockets/XSocketServerPlugins" (see image below)

When the server start the plugin will be registered and you wil be able to connect to it.

Creating the UI for our video-chat.

Add a new html-file to the root, name it default.html (if you want to follow the tutorial exactly). I then installed twitter bootstrap and knockoutjs to get a cleaner and more good looking page.

Adding WebRTC in the UI (included in 2.3)

To be able to use the WebRTC API you will need an extra javascript resource from XSockets.NET. You can see all resources in this solution (when you donwload it) but if you want to reference the file it´s at http://xsockets.net/js/XSockets.WebRTC.1.0.2.min.js

 

Writing JavaScript

XSockets default JavaScript API handles all communication between server/clients, but we will in the next release have an extension for this that targets WebRTC (as you can see above). This API will handle WebRTC communication and DataChannels comunication. When a browser does not support datachannels we will fallback to WebSockets. Since the WebRTC API is all about Peers there are no built-in methods for a phone-call like API-scenario. However, Magnus (the master behind the WebRTC stuff in XSockets.NET) has built yet another extension upon the WebRTC API so that we can use it in a convenient way making calls. The API for that is named CallManager and is described below.

CallManager

Since the WebRTC API is focused on context and not calls Magnus created the CallManager. Below we describe the methods and events in the CallManager that with ease let you call, answer-call, deny-call and end-call.

Methods

call (peerContext)

Will trigger the onCall event at the client you call.

denyCall (peerContext)

Will trigger the onDenyCall on the client calling

acceptCall (peerContext)

Will trigger the onAcceptCall on the client calling.

endCall()

Will trigger the onPeerConnectionLost event and pass information about the peer lost. You will have to listen for this event and handle the lost peer. Example below when we show how to setup WebRTC events.

Events

onCall (peerContext)

A function that is called when someone shares a peerContext with the acutual client.

onAcceptCall(peerContext)

A function that is called when the actual client ( client that recived an on onCall event ) invokes the XSockets.WebRTC.CallManager.acceptCallmethod ( see above).

onDenyCall (peerContext)

This is a function that is called when the remote peer (peerContext) called denies the call ( offer ). it occues when the remote part invoked the XSockets.WebRTC.CallManager.denyCall method.

1: WebSocket Connection and WebRTC object

First of all we will connect to XSockets, and then we will pass the connection into our WebRTC object.

ws = new XSockets.WebSocket("ws://127.0.0.1:4502/PeerBroker", "PeerBroker");
webrtc = new XSockets.WebRTC(ws, settings);
//Setup the events we want for webRTC
setupWebRTCEvents();
//setup CallManager, really just an extension on the WebRTC object to simplify calls
setupCallManager();

2: setupWebRTCEvents

var setupWebRTCEvents = function() {
webrtc.bind(XSockets.WebRTC.Events.onContextCreated, function (peerContext) {
//When we get a context from the server, store it in the viewmodel. This is each clients unique context!
PeerVM.Me.Context = peerContext.Context;
}); //When the localstream is ready, attach it to the video element
webrtc.bind(XSockets.WebRTC.Events.onlocalStream, function (stream) {
attachMediaStream(document.querySelector("#localVideo"), stream);
}); //When remote stream arrive attach it to the remote video element area
webrtc.bind(XSockets.WebRTC.Events.onRemoteStream, function (event) {
audio.stop();
var remoteVideo = $("<video>").addClass("remote-video").attr({
width: "212",
height: "120",
autoplay: "autoplay",
controls: "controls",
rel: event.StorageGuid
});
attachMediaStream(remoteVideo.get(0), event.MediaStreamEvent.stream);
$("#talk").append(remoteVideo); // Append the video to DOM $('#btn-hangup').fadeIn();
}); //When someone leaves, remove the video!
webrtc.bind(XSockets.WebRTC.Events.onPeerConnectionLost, function (peerContext) {
$("[rel='" + peerContext.StorageGuid + "']").remove(); if ($('video','#talk').length == 0) {
$('#btn-hangup').fadeOut();
}
});
};

3: setupCallManager

var setupCallManager = function() {
callmanager = new XSockets.WebRTC.CallManager(ws, {
events: {
onCall: function (peerContext) {
//Show modal
$('#caller', '#callModal').text(peerContext.ScreenName + ' is calling...');
$('#callModal').data('ctx', peerContext).modal('show'); //Play sound
audio.play('call');
},
onAcceptCall: function (peerContext) {
webrtc.changeContext(peerContext.Context); //stop sound
audio.stop();
},
onDenyCall: function (peerContext) {
//play busy sound
audio.play('busy');
setTimeout(function () {
audio.stop();
}, 3000);
}
}
});
};

4: startWebRTC

The last step... We need to "activate" the localstream, and in the callback we set the screenName and ask for other clients etc.

var startWebRTC = function () {
webrtc.getUserMedia({
audio: true,
video: true
}, function () {
webrtc.ready(PeerVM.Me.ScreenName); ws.bind("BrokerPeers", function (arrPeerContext) {
arrPeerContext.forEach(function (p) {
if (p.StorageGuid !== PeerVM.Me.StorageGuid) {
PeerVM.Add(p);
}
});
}); ws.bind("PeerContextCreated", function (p) {
if (p.StorageGuid == PeerVM.Me.StorageGuid) {
return;
}
PeerVM.Add(p);
}); // A Peer disconnects from the PeerBroker
ws.bind("PeerContextDestroyed", function (p) {
PeerVM.Remove(p);
}); // Ask who is here...
ws.trigger("PeersOnBroker", {});
});
};

That´s it...

We can now use the callManager to call other clients by just saying callmanager.call(peerContext) and the other client will get notified about the incomming call.

IMPORTANT! To test it on localhost create multiple profiles in chrome so that you get unique contexts.
http://support.google.com/chrome/bin/answer.py?hl=en&answer=2364824

Screenshots

Logging in with 3 users in chrome

Me calling myself :)

 

Yay :)

 

Download this example!

Code available on GitHub: Go there!

Regards

Uffe on the behalf of Team XSockets


XSockets.WebRTC.APIs soon to be releases on Nuget!

Monday, February 18, 2013 7:57 AM 2

Just a few words

Back in 2011 when we first heard of the WebRTC initiative during a trip to US, we, Team XSockets understood that it would dramatically would change how we build applications delivering high quality, rich media experiences and real-time web-applications.

We, the team behind XSockets.NET has since the been following the great work done by astute people from Google, Mozilla and Opera ( yes, we know that there are more people doing a great job). As you all may have noticed we have done a series of experiments upon our real-time framework in this area, first we did a 1-1 video call, and as soon as it was possible to run multiple peer connections in Chrome, we also did that!

We decided to ship an early experiment, that we pretty fast removed due to lack of time to make it usable.

During late 2012 , browsermeeting.com was brought to life, a work done primarily by the core team.

We are now working on a new version of XSockets (3.x) , the goal is still to ship in Q1 of 2013 - I will contain a set of components and libraries that will help you build WebRTC stuff ( such as browsermeeting.com ) .

Further on in this document you will find a teaser of how you can use XSockets.NET to build your own WebRTC-powered web-apps.If you can't wait, just shoot as a email on develop@xsockets.net and we will pass you a package as soon as a pre-release is available ( Yes, we will ship the WebRTC things on 2.2 version). There is also a possibility to use our Windows Azure hosted services, the examples below will show how you use that option.

Let get to business then and speak some code

In this post we will explain the concept, and show a few lines of JavaScript, we will skip the server-side ( PeerConnection) today and focus on the JavaScript API usage.

Before we start we need to sort a few things out.

At the server side there is a XSockets.Contoller that handles the sessions, session announcement, session invitation, and parameter negotiation for the peers to be connected.
It also handles the routing of peers - Who connects to whom, and who am I connected to.

As mentioned above there is a server-side XSockets.Controller, this acts as the PeerConnection Broker.

We have decided to use the term "Contexts"


To make it as simple as possible, we have chosen the term “context”. It described as follows.
When a client connects to the XSockets.Controller, it will receive a "context" ( JSON literal ). The context contains a token (unique-identifier) that can be shared to others .
Just by changing the actual context you will recive an context-change event, this event will contain a list of clients matching the provided "context"
When receiving a context-change, the API will start connect, and negotiate to those clients connected at the moment. ( Yes, you can join a context when ever you want )
The API will , when a successful negotiation occurs, throw an onremotestream event, giving you the possibility to add the mediaStream to an HTML video element.


Code examples

We created a very simple example of how you set up a context, connect and create a extramly simple WebRTC video conference.

A very simple UI (markup)

 
<body>
    <p>
        <button class="rtc">Access camera and connect to context</button>
    </p>
    <h1>You</h1>
    <div>
        <video id="localVideo" class="you" autoplay="autoplay"></video>
    </div>
    <div>
        <label for="shareurl">Copy this URL and open in a new window or share with a friend..</label>
        <input type="text" id="shareurl" style="width: 100%" />
    </div>
    <h2>Others</h2>
    <div id="remoteVideos" class="others">
    </div>
</body>
</html>

JavaScripts API's used

Include the following scripit resources ( grab the here, as a zip file )

<script src="Scripts/jquery-1.9.1.min.js"></script>
<script src="Scripts/jXSockets.2.2.min.js"></script>
<script src="Scripts/Adapter.js"></script>
<script src="Scripts/XSockets.WebRTC.1.0.2.min.js"></script>

.

JavaScript code ( Setup, connect and share PeerConnections )

As you can see below we are using a PeerBroker (XSockets.Controller) placed at xwebrtc.cloudapp.net,  that is our Azure hosted version of the XSockets.Controller taking care of signaling as described above. This controller will allow you to connect from any site , so its free for you all to use. I also has the Generic behavior of an "regular" XSockets.Controller , so you add yor custom events (pub&subs) to extend this example. 

 

      var webRTC, ws, constraints, currentContext;
        $(document).ready(function () {
            // This is the XSockets.Controller (Peer Broker )
            ws = new XSockets.WebSocket("ws://xwebrtc.cloudapp.net:10101/Sip", "Sip");
            webRTC = new XSockets.WebRTC(ws, {
                onContextCreated: function (event) {
                    // Fires when the current is connected to the Controller (Peer boooker)
                    currentContext = event.Context;
                    //     $("#context").text(currentContext);
                    // try get a context pass un the url, if we got gone, we will connect to it.
                    var p = XSockets.Utils.getParameterByName("p");
                    if (p.length === 36) currentContext = p;
                    // Display the url to share
                    var url = location.origin + location.pathname + "?p=" + currentContext;
                    $("#shareurl").val(url);
                },
                onContextChange: function (event) {
                    // Fires if some one enters or leaves this context 
                },
                onLocalStream: function (stream) {
                    // When we got a local mediaStream ( attach it to the DOM )
                    attachMediaStream(
                    document.querySelector("#localVideo"),
                    stream);
                },
                onRemoteStream: function (mediaStreamEvent, uniqueId) {
                    // When we got a remote mediaStream , create a new video and attach the remote media Stream
                    var video = $("<video>").attr({
                        autoplay: "autoplay",
                        controls: "controls"
                    });
                    attachMediaStream($(video).get(0), mediaStreamEvent.stream);
                    $("#remoteVideos").prepend(video);
                }
            });
            $(".rtc").one("click", function (evt) {
                evt.preventDefault();
                $(this).hide();
                webRTC.getUserMedia({
                    audio: true,
                    video: trues
                }, function () {
                    // Just change to context now, and get ready fo others to join the currentContext
                    webRTC.changeContext(currentContext);
                });
            });
        });

 In addition to the events and methods shown above in the JavaScript code, there are a few more that can benefit you. We will as soon as the package is relased add a new section that covers the WebRTC abstraction layer of XSockets.NET

 

Links

Here is a list of links to our demos and other usefull resouces 

Summary

No doubt WebRTC is an exciting and amazing technology. Although WebRTC is a small part of XSockets we think that it might be a huge part of the future in XSockets. We have been in the business of realtime development for about 3 years now and it´s truly great to see where we and our colleagues in business are heading.

2013 is said to be the year of browser communication, and what a start we have had! In late 2012 we´ve got Video/Audio communication from the WebRTC team, and now they give us Screensharing and not far away we see DataChannels.

 

Kind regards,

Team XSockets.NET, 18th of February 2013

 

ps. Please leave a comment if you got a question.


Sneak Peek of the 3.0 features

Monday, January 07, 2013 1:50 PM 3

The Team is working hard to deliver XSockets.NET 3.0 as soon as possible.

We just wanted to list some of the new features here to let you know what´s comming, and also give you a chance to rasise your voice if you have specific needs or ideas.

We will work hard but can´t guarantee that this will be the actual featurelist of 3.0.

Deliver messages to offline clients when they get back online

XSockets have had persistence between connections for a long time. To clarify this... The server knows who each client are and can store information about (or from) the client on the server between connection (for example if the user switches to another page, a new HTTP-request). In theory the client could have been the target for messages during the time it took to do the new HTTP request. XSockets will now be able to deliver messages to clients that were offline when the messages was sent. By default the messages will be stored in-memory until delivered. If you need persistent storage you will be able to implement this yourself.

Better binary support

As you may know the WebSocket API has binary support, but you can´t send information about the binary data together with the actual bytes... Atleast not if you follow the specifications. XSockets have had binary support for a long time, but we will now improve this with the possibility to attach objects together with your binary data for easier handling of files etc. at serverside.

Clustered XSockets.NET servers

A great new feature that enables all XSocket servers to know about each other. No server is master, all servers dispatches messages between them and their clients. Will probably be a beta-feature in the upcomming release.

Mono Support

We have been getting lots of questions about Mono-support, and we may release this very soon. Thanks to the Mono-project a whole new platform may be available for XSocket-ers.

Routing/Messaging between controllers

XSockets have improved the message-model even more and will now let you communicate between controllers in efficient ways. One of the most exciting features in this area is the possibility to send messages to other controller with lambda expressions for filtering the clients targeted.

WebRTC Controller

We have been playing around with WebRTC for about 18 months and you can look at one of the results at http://browsermeeting.com - We will ship a signaling controller by default in XSockets for easy setup of P2P connecitons with XSockets and WebRTC.

Improved Exceptionhandling (the plugin framework)

If you add dependencies to your XSocket projects you might get some exceptions that do not tell you very much. This will now change since we are trying to add functionality that will tell you what assmeblies you might be missing. Since XSokcets is based on a plugin-architecture you will not know this until runtime. More info about this feature will ship with the release.

No jQuery depency for the fallback

XSockets do not have any dependecies to other frameworks when you run a modern browser. When running IE9 and worse you will have to use our fallback. This fallback have had a jQuery dependency that probably will be removed in the next version of XSockets.

A Better Client API (C#)

We have always had a client API in XSockets. In previous versions this API has been located in the "External" assembly. We will now move this into a "Clients" assmebly. It also has improved features so that you easily can connect to XSockets and publish/subscribe from compiled resources (not only JavaScript). 

___________________________________

Questions, Opinions, etc... give us a shout at contact at xsockets.net

Regards
Team XSockets


XSockets 2.2 on Nuget

Tuesday, December 04, 2012 4:45 PM 0

We just released 2.2 of XSockets.NET!

Release notes

Stuff removed

A few extension methods was removed since they are no longer needed in the framework.

  • ForwardTo, use SendTo instead
  • ForwardToAs, use SendTo instead

Interface/Class removed

The IXNode interface and XNode class was removed since it was a legacy from way back when we needed to have a list of all clients. IXNode had two properties, ClientGuid and StorageGuid. These properties is now found on the IXBaseSocket (the connections baseclass). So if you previously used IXNode you can just remove the XNode from your code and everything should rock.

XNode was also a part of the eventarguments you will now get the IXBaseSocket directly in the arguments and that will give you less code to write.

Changes in extensions (some obsolete and some new)

A few extension is now obsolete, but will not give you errors if you choose to use them. Previously we had extensions with prefixes, "Send, Forward, Route and Dispatch". Now (besides the obsolete ones) we have Send or Route prefixes.

This is so that you will get a better understanding for what the extension do! Send will always trigger a external message to one or more clients (depending of the type of send).
Route on the other hand will always use the internal pipeline so that you can send messages between controllers (or to the same controller).

Performance

XSockets does NOT broadcast messages to every client connected as many other frameworks do. XSockets only send messages to the clients that are listening for a specific message. This gets even more powerful with the new extension that can send messages to clients in another controller filtered by lambda expressions!

Easier getting parameter information

We have added new extensions for retrieving parameterinformation passed from the client (when connecting) to the server.

Optional use of the "controller" suffix

If you have the "controller" suffix on you controllername like ChatController you can omit the controller part in the connection.

Both Example and ExampleController is ok in the connectionstring.

XSocketObservable

The internal observable have been improved in its subscriptions. You will now get information about the actuall object taht was "notified, error or completed".

New name for handler project

The XSocketHandler project that you get when you install XSockets is now renamed to XSockets.Controllers.

Scaffolding controllers to non-existing projects

If you scaffold a new controller and pass in -ProjectName ANonExistingProject
The scaffollder will create the new project and also add all post-build events nessesary for you so that the plugin will be automatically picked up by the server.

All features/changes will be documented shortly under the API part of the site.

Regards
Team XSockets


live.xsockets.net updates & news!

Tuesday, November 06, 2012 6:09 PM 0

After a few days of downtime on our beta version of live.xsockets.net we can announce that it is back online. We apologize if this caused you problems!

We can also announce that the latest core of XSockets.NET, note that the service is on beta state.

We will very soon publish some great , new features just designed for live.xsockets.net and you! - so get sure you grab a api-key!

We can also annonce that there is a new Nuget-Package comming in the next release, making it very easy for you to deploy your XSockets.NET solutions on Windows Azure.

Any other news?

Yes, we can also tell you that we are working on embedding a set of things to both the client, and server API's in the area of WebRTC. Features such as PeerConnection API support (p2p), SignalingController (easy to use) and much more.

If you are running a WebRTC enabled browsers (Google Chrome 23+) you can try our" WebRTC Video conferencing Appliction" that infact are using the live.xsockets.net services.

Linksrl