1. A gateway selection method, for a wireless mesh network, said gateway selection method comprising: (a) building, by a computer, a spanning routing tree to a mesh network; (b) calculating, by the computer, reference factors which indicate an efficiency of a routing path of a select number of a plurality of routers within the mesh network to a total network capacity in association with the spanning routing tree, the reference factors being determined as follows: Φ P ⁡ ( g → j ) = 1 ∑ All ⁢ ⁢ e ∈ E p ⁡ ( g → j ) ⁢ ( d ⁡ ( e ) R ) 2 ⁢ α + 1 ( H P ⁡ ( g → j ) ) 2 ⁢ β ⁢ ⁢ where ⁢ ⁢ ( α + β = 1 ) where, p(g→j) denotes a routing path from router g to router j, Φ P(g→j) denotes a reference factor indicating the efficiency of the routing path from router g to router j, E P(g→j) denotes a set of links on the routing path p(g→j), R denotes a transmission range of a router, d(e) denotes a length of a link e, and H P(g→j) denotes a hop count of routing path p(g→j); (c) selecting, by the computer, one of the plurality of routers as an optimal gateway, said selected router having a highest reference factor of the reference factors calculated in step (b).