1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vweb: support ipv6 (#13498)

This commit is contained in:
Anton Zavodchikov 2022-02-18 01:13:36 +05:00 committed by GitHub
parent eb45a321a5
commit da9331f8ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -385,7 +385,7 @@ pub fn run<T>(global_app &T, port int) {
// Example: `vweb.run_at(app, 'localhost', 8099)` // Example: `vweb.run_at(app, 'localhost', 8099)`
[manualfree] [manualfree]
pub fn run_at<T>(global_app &T, host string, port int) { pub fn run_at<T>(global_app &T, host string, port int) {
mut l := net.listen_tcp(.ip, '$host:$port') or { panic('failed to listen $err.code $err') } mut l := net.listen_tcp(.ip6, '$host:$port') or { panic('failed to listen $err.code $err') }
// Parsing methods attributes // Parsing methods attributes
mut routes := map[string]Route{} mut routes := map[string]Route{}