jensmark / Socket.IO.Client

Xamarin bindings for the Socket.IO Clients

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 ();

About

Xamarin bindings for the Socket.IO Clients

License:MIT License


Languages

Language:PowerShell 40.4%Language:C# 39.2%Language:Shell 20.3%