Surprise! We've been running on hardware provided by BuyVM for a few months and wanted to show them a little appreciation.
Running a paste site comes with unique challenges, ones that aren't always obvious and hard to control. As such, BuyVM offered us a home where we could worry less about the hosting side of things and focus on maintaining a clean and useful service! Go check them out and show them some love!
Submitted on September 20, 2018 at 07:16 PM

New Paste 1 (Crystal)

require "socket"

def handle_connection(socket)
  loop do
    payload_size = socket.read_bytes(Int32)
    raw_message = socket.read_string(payload_size)
    puts raw_message
  end
rescue e
  puts "Disconnected from the Master Server"
  puts e
end

begin
  spawn do
    check = TCPSocket.new("0.0.0.0", 9300)
    check.tcp_nodelay = true
    puts "Successfully connected to the Master Server"
    handle_connection(check)
  end
  loop do
    sleep 1
  end
rescue e
  puts e
end