Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
An extremely efficient C# WebSocket server.
C#
branch: Cleanup

This branch is 70 commits behind master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
Classes
Handlers
Libraries
Properties
AccessPolicyServer.cs
Alchemy.config
LICENSE.md
README.md
Server.6.0.ReSharper
Server.csproj
Server.pidb
Server.sln
TCPServer.cs
THIRDPARTY.md
WebSocketServer.cs

README.md

Alchemy Websockets

A websocket server built in C# to be extremely efficient and scalable over high numbers of connections.

You can download the client javascript library at alchemy-websockets-client-library

Documentation: docs.alchemywebsockets.net

Usage

Alchemy Websockets is a Visual Studio 2010 project. It can be loaded in the free Visual C# Express and Monodevelop as well (and potentially other compatible IDEs.)

After compilation, include the dll as a reference into your project. From there, starting a server is as simple as instantiating an WSServer object, opening the connection, and binding events.

An example application can be seen on alchemy-websockets-example

Example:

    static void Main(string[] args)
    {
    var aServer = new WSServer(8100, IPAddress.Any)
    {
        DefaultOnReceive = new OnEventDelegate(OnReceive),
        DefaultOnSend = new OnEventDelegate(OnSend),
        DefaultOnConnect = new OnEventDelegate(OnConnect),
        DefaultOnConnected = new OnEventDelegate(OnConnected),
        DefaultOnDisconnect = new OnEventDelegate(OnDisconnect),
        TimeOut = new TimeSpan(0, 5, 0)
    };

    aServer.Start();
    }

    static void OnConnected(UserContext aContext)
    {
      Console.WriteLine("Client Connection From : " + aContext.ClientAddress.ToString());
    }

    //...etc

Documentation

Check out our documentaion at http://olivinelabs.com/Alchemy-Websockets

Status

Alchemy websockets supports:

  • (!) hixie-76 (hybi00)
  • (✓) hybi-10
  • (✓) hybi-17 (official protocol)

hixie-76 has open issues. Because it is on the official support list (due to Safari), it is on the list to be resolved.

This covers Chrome current, beta, and alpha channels; Firefox latest, beta, and alpha channels; Safari, and includes support for a flash-based socket fallback for browsers with no socket support natively.

Browser Support List

License

Copyright 2011, Olivine Labs, LLC. Licensed under LGPL and MIT.

Something went wrong with that request. Please try again.