소스 검색

Added right mq topic

Ronald Peterson 10 년 전
부모
커밋
641a7def48
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      games/game.go
  2. 1 1
      games/games.go

+ 1 - 1
games/game.go

@@ -15,7 +15,7 @@ type Game struct {
 }
 
 func NewGame(cols, rows int) *Game {
-	createTime := time.Now().UnixNano()
+	createTime := time.Now().UnixNano()/1000
 
 	game := &Game{
 		Id:        createTime,

+ 1 - 1
games/games.go

@@ -62,7 +62,7 @@ func (games Games) AddGame(game *Game, stompConnection *extStomp.Conn) {
 		GameId: game.Id,
 	}
 	b, _ := json.Marshal(stompGameStart)
-	stompConnection.Send("gopinguin.game", "", b)
+	stompConnection.Send("/topic/go-battlecamp.game", "", b)
 }
 
 func (games Games) ListGames() []*Game {