Git Product home page Git Product logo

alchemy-websockets's Introduction

Alchemy Websockets

Version 2.0.0

Protocol Support

Alchemy websockets supports:

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

An extremely efficient C# WebSocket server.

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

Documentation: olivinelabs.com/Alchemy-Websockets/

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 documentation at http://olivinelabs.com/Alchemy-Websockets

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

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

alchemy-websockets's People

Contributors

ajacksified avatar doriangray avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.