mirror of
https://github.com/dragonheim/gagent.git
synced 2025-04-26 02:18:59 -07:00
Converting client side connection over to use net/http instead of zmq.
This commit is contained in:
parent
f543276b82
commit
16d40fd93a
5 changed files with 52 additions and 53 deletions
|
@ -3,6 +3,7 @@ package worker
|
|||
import (
|
||||
fmt "fmt"
|
||||
log "log"
|
||||
http "net/http"
|
||||
sync "sync"
|
||||
|
||||
gs "git.dragonheim.net/dragonheim/gagent/internal/gstructs"
|
||||
|
@ -26,6 +27,10 @@ func Main(wg *sync.WaitGroup, config gs.GagentConfig, rid int) {
|
|||
subscriber, _ := zmq.NewSocket(zmq.REP)
|
||||
defer subscriber.Close()
|
||||
|
||||
go func() {
|
||||
http.ListenAndServe(fmt.Sprintf("%s:%d", config.ListenAddr, config.ClientPort), nil)
|
||||
}()
|
||||
|
||||
log.Printf("[DEBUG] Attempting to connect to %s\n", connectString)
|
||||
subscriber.Connect(connectString)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue