0.0
No commit activity in last 3 years
No release in over 3 years
A simplistic interactive chat console using the sps_chat gem.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0.1.1, ~> 0.1
>= 0.1.2, ~> 0.1
 Project Readme

Introducing the sps_chat-cli gem

The sps_chat-cli gem is used for interactive chat using a command-line interface.

Setting up the SPS broker

In order for chat to work you need to install and run the SPS broker (simplepubsub gem) e.g.

require 'simplepubsub'

SimplePubSub::Broker.start host: '127.0.0.1', port: 8080

Creating a user and connecting to the chat service

To connect to the chat service run the following code either in an IRB session or from an executable Ruby script file:

require 'sps_chat-cli' 

SPSChatCli.new typing_mode: true

Notes:

  • If a userid is not supplied as a named keyword then a random userid will be created
  • The default host is 127.0.0.1
  • The default port is 8080
  • typing_mode set to true allows each chat user can see the other user's message as they type it.

Demo

Here's a short video of 3 chat users chatting with other:

Note: The chat sessions were displayed all in 1 window using the terminal multiplexer program called screen.

!v

Resources

sps_chat chat typing simplepubsub sps