code: function share() {
      var status = $.trim($('#status').val()),
          target = $('#target').val();
  
      // Nothing to share
      if(status === '') {
        return;
      }
  
      // When messaging an individual user, update the target to be the user
      // that is being messaged.
      if(target === 'user') {
        target = $('#target_user').val();
      }
  
      // Dispatch the message to the server.
      socket.emit('post', status, target);
  
      // Clear the status input for the next message.
      $('#status').val('');
    }
docs: Call this method when you are ready to send a message to the server.