1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
Delyan Angelov 177bb30013
net: change default of the socket used by net.listen_tcp, to dualstack, even if the OS has a different default. Allow changing the listen backlog too
With this change, example vweb programs, will continue to be available to both
ipv6 and ipv4 connections from the same machine, even after doing (on linux):
`echo 1 | sudo tee /proc/sys/net/ipv6/bindv6only`

Previously, after that, vweb programs responded only to ipv6 connections, but not to ipv4 ones,
i.e. opening http://127.0.0.1:8082/ stopped working, for `v run examples/vweb/vweb_example.v` .

Note: GO web servers have the same behaviour, which is convenient for development/testing,
since it makes the programs more consistent and robust in the face of OS settings changes.
2023-08-01 11:32:08 +03:00
..
2023-05-12 09:31:27 +03:00
2023-05-12 09:31:27 +03:00
2023-05-12 09:31:27 +03:00
2022-04-15 14:58:56 +03:00
2023-05-12 09:31:27 +03:00

Description:

net provides networking functions. It is mostly a wrapper to BSD sockets, so you can listen on a port, connect to remote TCP/UDP services, and communicate with them.