2016-11-28 14:13:15 +09:00
|
|
|
package communicate
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
2017-05-29 19:53:29 +09:00
|
|
|
"git.loafle.net/commons/communicate/events"
|
2016-11-28 14:13:15 +09:00
|
|
|
)
|
|
|
|
|
|
|
|
var _c *communicator = nil
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
fmt.Println("init communicator")
|
|
|
|
_c = NewCommunicator()
|
|
|
|
_c.start()
|
|
|
|
}
|
|
|
|
|
2016-11-28 14:43:22 +09:00
|
|
|
func SetRootURL(url string) {
|
|
|
|
_c.RootURL = url
|
|
|
|
}
|
|
|
|
|
2016-11-28 15:00:12 +09:00
|
|
|
func GetRootURL() string {
|
|
|
|
return _c.RootURL
|
|
|
|
}
|
|
|
|
|
2016-11-28 14:13:15 +09:00
|
|
|
func Send(e *events.Event) {
|
|
|
|
_c.addEvent(e)
|
|
|
|
}
|