Golongpoll Golang HTTP 的 longpolling 库

程序名称:Golongpoll

授权协议: MIT

操作系统: 跨平台

开发语言: Google Go

Golongpoll 介绍

Golongpoll 是 golang HTTP 的 longpolling 库,可以使构建 web pub-sub 更加容易。

基本用法:

import  "github.com/jcuga/golongpoll"
// This launches a goroutine and creates channels for all the plumbing
manager, err := golongpoll.CreateManager()
// Expose events to browsers
// See subsection on how to interact with the subscription handler
http.HandleFunc("/events", manager.SubscriptionHandler)
http.ListenAndServe("127.0.0.1:8081", nil)
// Pass the manager around or create closures and publish:
manager.Publish("subscription-category", "Some data.  Can be string or any obj convertable to JSON")
manager.Publish("different-category", "More data")

Golongpoll 官网

https://github.com/jcuga/golongpoll

相关编程语言

BlazeDS 是一个基于服务器的Java 远程控制(remoting...
OVal 是一个可扩展的Java对象数据验证框架,验证的规...
Volta 是一套开发工具,专为开发分布式、实时系统应...
OpenDDS 是一个开源的 C++ 实现的 对象管理组织 OMG...
JADE (Java Agent DEvelopment Framework) 是一个完...
FastMM ,在D2006和2007中已代替了原来的内存管理器。