This gem provides a CLI (Command Line Interface) that allows the following apps to work together:

  1. The client app

    • Reads 1024 bytes from /dev/urandom

    • Cleans out all non UTF-8 compliant chars

    • Replaces all spaces with asterix

    • Sends this data to a server via TCPSocket

  2. The server app

    • Listens for any connections

    • Accepts the data from the client app

    • Prints it into a log file


From RubyGems

The easiest way to install the application is to install as a gem from RubyGems. Run the command below

$ gem install crossover

From source code

  • If you have access to the Internet, obtain the source code from Github repository.

    $ git clone
  • If you have access to the archive, go to the Code folder.

    $ unzip ChristianKyony_SE_Ruby_Network
    $ cd Code
  • Access the source code folder directory.

    $ cd crossover
  • Install the dependencies

    $ bin/setup
  • Install the gem in your local machine

    $ bundle exec rake install
  • Run the test suite

    $ rake test


Basic Usage

You need only two commands. Start by launching the server app.

$ crossover server

The server will be listening on TCP port 50000 and will log all data received from TCP clients in the ~/crossover.log file.

You should see something similar to the following:

[Wed Jan 25 22:50:02 2017] Crossover::Server start

To send data to the server on the default port, run the command below

$ crossover client

The client will automatically send data to the running server. You should see something similar to the following:

Sending 504 bytes to port 50000 on
)S:.DsDTB4'eI*da}[email protected]&'!wl*5n10juoeLy(FUkh5:.bicDA=s:Nyl?t*=*8%qYIc{
{?7,*2L!li*y&?qy*(%:hEVDVr$5,F*DD*[email protected]'/>D](:?_*}/YoF\Syo2V*;_8W<*ezhxUiVbLwB
rwmty7Wp*vMX**Rp*^tj/H*i*O&[email protected]=.N7e\"1;RlbR/W)rE&<cQ"\H*&1oAmjmv'WP*=h&9*

Advanced Usage

You can get help on available commands.

$ crossover help
  crossover --version, -v   # Print the version
  crossover client          # Send data to a remote HOST listening on PORT
  crossover help [COMMAND]  # Describe available commands or one specific command
  crossover server          # Launch a server listening on PORT

You can get help on specific options when launching the server app with crossover server

$ crossover help server
  crossover server
  -h, [--host=HOST]          # Default:
  -p, [--port=N]             # Default: 50000
  -l, [--logfile=LOGFILE]    # Default: ~/crossover.log
  -c, [--max-connections=N]  # Default: 1000

You can get help on specific options when launching the client app with crossover client.

$ crossover client
  crossover client
  -h, [--host=HOST]  # Default:
  -p, [--port=N]     # Default: 50000
  -d, [--data=DATA]


The gem is available as open source under the terms of the [MIT License](


  • This gem has been developed for POSIX system (LINUX, MAC OS)