All Projects → f-hj → slsk-client

f-hj / slsk-client

Licence: MIT License
🐦 Soulseek client for NodeJS

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to slsk-client

soulseek-docker
🐳 Soulseek Over noVNC Docker Container
Stars: ✭ 149 (+35.45%)
Mutual labels:  slsk, soulseek
as2-server
A standalone Java AS2 server - see as2-lib for the generic parts
Stars: ✭ 29 (-73.64%)
Mutual labels:  socket
UnityWebSocket
🐳 The Best Unity WebSocket Plugin for All Platforms.
Stars: ✭ 321 (+191.82%)
Mutual labels:  socket
Symbol
Symbol .net library
Stars: ✭ 14 (-87.27%)
Mutual labels:  socket
laravel-redis-chat
Real Time Chat with Laravel, Node.js, Redis and Socket.io
Stars: ✭ 84 (-23.64%)
Mutual labels:  socket
memsocket
An asynchronous in-memory socket-like interface for Rust
Stars: ✭ 34 (-69.09%)
Mutual labels:  socket
30dayMakeCppServer
30天自制C++服务器,包含教程和源代码
Stars: ✭ 432 (+292.73%)
Mutual labels:  socket
nicotine-plus
Graphical client for the Soulseek peer-to-peer network
Stars: ✭ 601 (+446.36%)
Mutual labels:  soulseek
chat-server
💬 [WIP] Simple Chat Server built with React, Node, Express and Socket.io
Stars: ✭ 18 (-83.64%)
Mutual labels:  socket
Soulseek.NET
A .NET Standard client library for the Soulseek network.
Stars: ✭ 107 (-2.73%)
Mutual labels:  soulseek
SockNet
The easiest and fastest way to work with sockets in C#
Stars: ✭ 42 (-61.82%)
Mutual labels:  socket
SeekerAndroid
Android client for the Soulseek peer-to-peer network
Stars: ✭ 37 (-66.36%)
Mutual labels:  soulseek
realgpserver
程序采用Python语言进行编写开发,用来接收GPS原始数据,并进行解析入库Mysql。主要用到SocketServer,log,command,dbhandler,config几个模块。
Stars: ✭ 13 (-88.18%)
Mutual labels:  socket
BaseIotUtils
🔥🔥串口工具,屏幕适配,通知工具类,多文件断点下载,xls,xlsx操作,文件处理,crash控制,音视频播放,usb设备检测,adb工具等...
Stars: ✭ 44 (-60%)
Mutual labels:  socket
node-abstractsocket
Abstract namespace socket support for Node
Stars: ✭ 24 (-78.18%)
Mutual labels:  socket
Vutils
Vutils or Vic Utilities is an utility library written in Modern C++ and for Modern C++. It helps your programming go easier, faster, and simpler.
Stars: ✭ 16 (-85.45%)
Mutual labels:  socket
KTV
KTV系统,C#前后台,Android客户端。播放器使用迅雷开源APlayer播放引擎。
Stars: ✭ 33 (-70%)
Mutual labels:  socket
ddos
Simple dos attack utility
Stars: ✭ 36 (-67.27%)
Mutual labels:  socket
RxSocket
RxSocket连接
Stars: ✭ 31 (-71.82%)
Mutual labels:  socket
socket-chat
This project will help you build a chat app by using the Socket IO library.
Stars: ✭ 36 (-67.27%)
Mutual labels:  socket

Soulseek NodeJS client

Build Status JavaScript Style Guide GitHub stars

Before starting

You must already have a Soulseek account before using this module.

Implemented

  • File search
  • File download

Not implemented

This stuff is not implemented (yet?), but I wait your PR!

  • Chat
  • Sharing (+ Upnp opened port)

Infos

You must choose file with slots: true, or you'll wait a long time before downloading it.

I advise you to sort files by speed and select the best one (OK, speed is sent by client and can be fake, but the big majority is real).

Getting started

const slsk = require('slsk-client')
slsk.connect({
  user: 'username',
  pass: 'password'
}, (err, client) => {
  client.search({
    req: 'random',
    timeout: 2000
  }, (err, res) => {
    if (err) return console.log(err)
    res = [
      {
        user: 'poulet',
        file: '@@poulet-files/random.mp3',
        size: 6437362,
        slots: true,
        bitrate: 320,
        speed: 1251293
      }
    ]
    client.download({
      file: res[0],
      path: __dirname + '/random.mp3'
    }, (err, data) => {
      //can res.send(data.buffer) if you use express
    })
  })
})

API

slsk

connect

argument
key required value default note
user true Your username
pass true Your password
host choose a different host for Slsk server server.slsknet.org
port choose a different port 2242
incomingPort Port used for incoming connection 2234
sharedFolders Folders to be shared []
callback

Return client (see just here )

client

search

argument
key required value default note
req true Sent to slsk server/peers to search file, use space to add keyword
timeout Slsk doesn't sent when search is finished. We ignore request after this time 4000
callback
key value note
user Peer name of slsk
file Full path of peer file
size Size of file
slots Available slots true if peer have enough slots to get file immediately
bitrate Bitrate of current file Can be undefined if not sent by client
speed Speed of peer Provided by peer, don't know what is it exactly

List of files

[
  {
    "user": "jambon",
    "file": "@@jambon-slsk/myfile.m4a",
    "slots": true,
    "speed": 32
  }
]
events

You can handle results with events

client.on('found') // any search result
client.on('found:${req}') // or only a specific request

download

Return buffered file, callback called when file is completely downloaded. (Stored in RAM)

argument
key required value default note
file true File sent when searched
path Complete path where file will be stored (if you want read it later) /tmp/slsk/{{originalName}}
callback
key value
buffer Complete buffer of file

downloadStream

WARNING: please report any issue with this function Return streamed file, wait for parts to be downloaded, can be used for HTTP 206 (partial content) for example

argument
key required value default note
file true File sent when searched
callback

Readable stream

Tests

Use env variables for tests

  • DEBUG=slsk:* to display debug messages
  • SLSK_USER=MyUsername
  • SLSK_PASS=MyPassword

Sources

ftp://ftp.tu-clausthal.de/pub/mirror/ftp.gwdg.de/gnu/ftp/savannah/files/mldonkey/docs/Soulseek/soulseek_protocol.html

https://www.museek-plus.org/wiki/SoulseekProtocol

https://github.com/Nicotine-Plus/nicotine-plus

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].