Skip to content

A .NET implementation of the Bayeux client protocol targeting netstandard1.1.

License

Notifications You must be signed in to change notification settings

patriksvensson/bayeux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bayeux

A .NET implementation of the Bayeux client protocol targeting netstandard1.1.

Example

using Bayeux;
using Bayeux.Diagnostics;

namespace Example
{
    public class Program
    {
        public static void Main(string[] args)
        {
            // Create the client settings.
            var endpoint = new Uri("http://localhost:8000/faye");
            var settings = new BayeuxClientSettings(endpoint)
            {
                Logger = new ConsoleLogger()
            };

            // Create the client.
            using (var client = new BayeuxClient(settings))
            {
                // Connect to server.
                client.Connect();

                // Subscribe to channel.
                client.Subscribe("/test", message => Console.WriteLine("Message received: {0}", message.Channel));

                // Wait for exit.
                Console.WriteLine("Press ANY key to quit.");
                Console.ReadKey(true);
            }
        }
    }
}

About

A .NET implementation of the Bayeux client protocol targeting netstandard1.1.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages