Engine.IO.Client

The Engine.IO Client Library for Android


Keywords
xamarin.android, android, websocket, engine.io, xamairn, socket.io, monodroid
License
MIT
Install
Install-Package Engine.IO.Client -Version 1.0.0

Documentation

Socket.IO Client

Build status Build Status

Xamarin bindings for the Socket.IO Clients. Socket.IO for Xamarin

Example Usage

Import the Namespace

using SocketIO.Client;

SocketIO.Client.Socket socket;

In the OnCreate method or anyhwere else you would like, you can now make the connection

Create the Socket

socket = IO.Socket ("http://chat.peruzal.co.za");

Subscribe to Events

socket.On (Socket.EventConnect, (data) => {
    Log.Debug(TAG, "Connected");
    socket.Emit("add user", "Xamarin Android");
});

Another Events

socket.On ("new message", (data) => {
    Log.Debug(TAG, data.ToString());
});

Connect

socket.Connect ();