Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

simple-transfer

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-transfer

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

This gem is created to make transfering whole directories; scripts, photos, videos, any files that are up to 30 MB simple and easy.

Please don't forget to read the notes section.

Usage

As the name suggests, to transfer files is simple and easy with simple-transfer.

The Transfer module has two methods: Transfer::run_server and Transfer::transfer.

Transfer::run_server

This method will run a server on your local machine. Once you call it, the server will listen for connections.

The server is for receiving files only. So the machine that will receive files needs to call this method first.

Transfer::transfer

This method takes two arguments, first argument is the IPv4 of the target; second one is the name of the file, directory that will be sent.

It will try to connect to the target machine if not already connected and send the files that are specified.

Example

The server:

require 'transfer'
include Transfer

Transfer.run_server

The client:

require 'transfer'
include Transfer

Transfer.transfer('192.168.1.25', 'foo.png')

Notes

  • Using simple-transfer from the interactive ruby shell is terribly bad.

  • simple-transfer uses tcp sockets and buffers data that are bigger than 65 KB. If you are receiving files only partially and encountering strange errors, try setting the $MAX_BUFFER_SIZE constant to a lower value.

  • To make simple-transfer work on the internetwork, port forwarding is required.

  • Relative paths are NOT supported in simple-transfer. Files need to be in the cwd to be transfered.

FAQs

Package last updated on 24 Jan 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc