Close all sockets on shutdown
This commit is contained in:
@ -123,6 +123,10 @@ extension AbstractTable: ManageableTable {
|
||||
sendUpdateToAllPlayers()
|
||||
return
|
||||
}
|
||||
|
||||
func disconnectAllPlayers() {
|
||||
players.forEach { $0.disconnect() }
|
||||
}
|
||||
|
||||
func sendUpdateToAllPlayers() {
|
||||
players.enumerated().forEach { playerIndex, player in
|
||||
|
@ -31,4 +31,6 @@ protocol ManageableTable {
|
||||
func disconnect(player name: PlayerName)
|
||||
|
||||
func sendUpdateToAllPlayers()
|
||||
|
||||
func disconnectAllPlayers()
|
||||
}
|
||||
|
Reference in New Issue
Block a user