IOExceptional / ssqlib

A Source Server Query Library - Exported from code.google.com/p/ssqlib

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status Package Status

Source Server Query Library

A Source Server Query Library - Exported from code.google.com/p/ssqlib

I did not write this code originally - it lived on google code and was going to be lost when that system was closed so I copied it over

Using SSQLib

using SSQLib;
using System.Net;

public void GetServerInfo()
{
    string ip = "127.0.0.1";
    int port = 27015;

    IPEndPoint endpoint = new IPEndPoint(IPAddress.Parse(ip), port);

    SSQL query = new SSQL();
    ServerInfo serverInformation = query.Server(endpoint);

    //You can now look at the properties of serverInformation to see what information you can retrieve.

    List<PlayerInfo> players = query.Players(endpoint)

    int playerCount = players.Count;
}

About

A Source Server Query Library - Exported from code.google.com/p/ssqlib

License:GNU Lesser General Public License v3.0


Languages

Language:C# 98.2%Language:Batchfile 1.8%