Git Product home page Git Product logo

mpd.lua's Introduction

mpd.lua

A Lua implementation of the MPD protocol (WIP)

State of the project

I think that right now this is almost usable, since the most important thing of implementing the MPD protocol is sending the commands and receiving responses (IMO) and this library does both, but not be surprised of unexpected behaviors.

So what's next?

Well, the most important things I need to do are:

  • Test the library to find errors and take care of them
  • Add support for (at least) http(s) connections
  • Add shortcut methods for all the commands (In Progress)

How to use

-- Import the library
local mpd = require("mpd")
-- Initialize the client, in this case, it will be initialized for a local server,
-- but you can pass a host and a port
mpd:new()
-- Attempt to connect to the server. NOTE: since this is still a WIP, connection
-- can fail to some kind of hosts
mpd:connect()
-- Send a command to the server, in this case the "play" command
mpd:send("play")
-- Get the server response
print(mpd:receive())
-- Close the client
mpd:close()

mpd.lua's People

Contributors

miqueas avatar

Stargazers

 avatar  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.