Payload data has now moved onto Pin struct.

This commit is contained in:
Alan Noble 2018-06-16 19:04:32 +09:30
parent 4c0d219fbf
commit 05c6c376b4
2 changed files with 5 additions and 7 deletions

View File

@ -310,7 +310,7 @@ func sendTo(ns *netsender.Sender) error {
} }
} }
_, reconfig, err := ns.Send(netsender.RequestPoll, inputs, nil) _, reconfig, err := ns.Send(netsender.RequestPoll, inputs)
if err != nil { if err != nil {
return err return err
} }

View File

@ -135,11 +135,9 @@ func (s *httpSender) load(c *ring.Chunk) error {
func (s *httpSender) send() error { func (s *httpSender) send() error {
pins := netsender.MakePins("V0", "") pins := netsender.MakePins("V0", "")
pins[0].Value = len(s.buf) pins[0].Value = len(s.buf)
var payload netsender.Payload pins[0].Data = s.buf
payload.Name = "V0" pins[0].MimeType = "video/mp2t"
payload.Data = s.buf _, _, err := s.client.Send(netsender.RequestPoll, pins)
payload.MimeType = "video/mp2t"
_, _, err := s.client.Send(netsender.RequestPoll, pins, &payload)
if err != nil { if err != nil {
return err return err
} }