Not sure if it's a bug so here the suggestion, we can /sockopen to localhost, but can't /sockudp to localhost :
alias test_sock {
sockopen test_sock 127.0.0.1 8000
echo -a /sockopen with 127.0.0.1 is fine
sockclose test_sock
sockopen test_sock localhost 8000
echo -a /sockopen with localhost is fine
sockclose test_sock
sockudp test_sock 127.0.0.1 8000
echo -a /sockudp with 127.0.0.1 is fine
sockudp test_sock localhost 8000
echo -a /sockudp with localhost is fine
}
It would make sense for /sockudp to also accept localhost as an ip address