Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

xmpp_server

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xmpp_server

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

xmpp_server

给xmpp 服务器push 消息的中转站

###实例

  • 如何启动服务
./bin/xmppserver

rake启动

rake xmppserver:start
  • 客户端code
require 'drb/drb'
SERVER_URI="druby://localhost:8787"  
DRb.start_service  
xmppserver = DRbObject.new_with_uri(SERVER_URI)  
3.times do |i| 
	xmppserver.push("tester002", "testdddeeee....")
	sleep 1
end  
  • 修改服务器地址,用户名和密码
XmppServer::Config.config do |s|
	s.username = "zhangsan"
	s.password = "xxxxxx"
	s.server   = "test.com"
end

Rails中,可以新建config/initializers/xmppserver.rb

  • Rails项目中的使用 新建config/initializers/xmppserver.rb文件
require 'drb/drb'
SERVER_URI="druby://localhost:8787"  
DRb.start_service  
XMPPSERVER = DRbObject.new_with_uri(SERVER_URI)  
XmppServer::Config.config do |s|
	s.username = "zhangsan"
	s.password = "xxxxxx"
	s.server   = "test.com"
end

###需要实现

  • 一个将配置文件复制到initializers目录的generator
  • 启动xmpp server 中转站的 task[start, stop , restart]
  • 需要充分的测试

FAQs

Package last updated on 27 Sep 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc