ldilley / rubircd

:speech_balloon: An IRC server written in Ruby
http://www.dilley.me/rubircd
GNU General Public License v3.0
22 stars 4 forks source link

Add support for ziplinks #5

Open ldilley opened 9 years ago

ldilley commented 9 years ago

After adding support for server-to-server communication, add ziplink support. This can be achieved by the following example:

@require 'zlib'

some_str = Zlib::Deflate.deflate("hello world!") puts some_str puts Zlib::Inflate.inflate(some_str)@

So, just need to call Network.send(socket, compressed_data) from the sending server and the server on the receiving end will call the deflate method on the received data to get the original message.