Skip to content

Commit

Permalink
update zproxy
Browse files Browse the repository at this point in the history
  • Loading branch information
inada-s committed Oct 24, 2019
1 parent d01554d commit e84db93
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
14 changes: 8 additions & 6 deletions src/zproxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,14 @@ func (z *Zproxy) ServeBattle() error {
case <-chFlush:
lastSend = time.Now()
pkt := proto.GetPacket()
{
data, seq, ack := svRudp.GetSendData()
pkt.Type = proto.MessageType_Battle.Enum()
pkt.BattleData = data
pkt.Seq = pb.Uint32(seq)
pkt.Ack = pb.Uint32(ack)
z.udpcl.SendPacketTo(pkt, z.svAddr)
}
for _, rudpBuf := range p2pRudp {
data, seq, ack := rudpBuf.GetSendData()
pkt.Type = proto.MessageType_Battle.Enum()
Expand All @@ -510,12 +518,6 @@ func (z *Zproxy) ServeBattle() error {
}
z.udpcl.SendPacketTo(pkt, addr)
}
data, seq, ack := svRudp.GetSendData()
pkt.Type = proto.MessageType_Battle.Enum()
pkt.BattleData = data
pkt.Seq = pb.Uint32(seq)
pkt.Ack = pb.Uint32(ack)
z.udpcl.SendPacketTo(pkt, z.svAddr)
proto.PutPacket(pkt)
}
}
Expand Down
1 change: 0 additions & 1 deletion src/zproxy/ps2io.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ func (sv *PS2Server) Listen(addr string) error {
}
sv.chNewConn <- &PS2Conn{conn}
}
return nil
}

func (sv *PS2Server) Accept() <-chan *PS2Conn {
Expand Down
5 changes: 4 additions & 1 deletion src/zproxy/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
var (
// These variables are automatically assigned during release process.
// `-s -w -X main.releaseVersion ={{.Version}} -X main.releaseCommit={{.ShortCommit}} -X main.releaseDate={{.Date}}
releaseVersion = "0.0.0"
releaseVersion = "local"
releaseCommit = "local"
releaseDate = "local"
)
Expand All @@ -24,6 +24,9 @@ func printReleaseInfo() {
}

func doSelfUpdate() {
if releaseVersion == "local" {
return
}
log.Println("アップデートチェックを行います")

latest, found, err := selfupdate.DetectLatest("inada-s/zdxsv")
Expand Down

0 comments on commit e84db93

Please sign in to comment.