Skip to content

Instantly share code, notes, and snippets.

@marto83
marto83 / WebSocket4NetTransport.cs
Created June 15, 2022 15:19
This is an alternative Websocket transport based on the WebSocket4Net framework instead of System.Net.Websocket. It's primarily used for older clients like Windows7.
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using IO.Ably.Realtime;
using IO.Ably.Transport;
using WebSocket4Net;
using SuperSocket.ClientEngine;
@marto83
marto83 / WebSocket4NetTransport.cs
Created June 22, 2020 12:50
Custom Ably Websocket transport based on WebSocket4Net
using System;
using System.Collections.Generic;
using IO.Ably.Realtime;
using IO.Ably.Transport;
using WebSocket4Net;
using SuperSocket.ClientEngine;
namespace IO.Ably.AlternativeTransports.WebSockets4Net
{
public class WebSocket4NetTransport : ITransport
@marto83
marto83 / IO.Ably.SyncExtensions.cs
Last active August 1, 2016 09:15
Ably Sync method extensions for the Rest Client. Sometime it is impossible to use the Async methods. Add the following code to your solution and add `using IO.Ably.SyncExtensions` where you need them.
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using IO.Ably.Rest;
namespace IO.Ably.SyncExtensions
{
public static class SyncExtensions
{
@marto83
marto83 / gist:4283933
Created December 14, 2012 09:13
New Query after config change
SELECT [Project2].[Id] AS [Id],
[Project2].[OrderId] AS [OrderId],
[Project2].[Name] AS [Name],
[Project2].[Email] AS [Email],
[Project2].[ChargeType] AS [ChargeType],
[Project2].[Status] AS [Status],
[Project2].[Created] AS [Created],
[Project2].[Updated] AS [Updated],
[Project2].[Id1] AS [Id1],
[Project2].[Addressee] AS [Addressee],
SELECT [Project2].[Id2] AS [Id],
[Project2].[Id3] AS [Id1],
[Project2].[Id6] AS [Id2],
[Project2].[Id4] AS [Id3],
[Project2].[Id8] AS [Id4],
[Project2].[Id7] AS [Id5],
[Project2].[Id11] AS [Id6],
[Project2].[Id12] AS [Id7],
[Project2].[Id15] AS [Id8],
[Project2].[Id13] AS [Id9],