Fix typo's in sockaddr_in6 struct

This commit is contained in:
Mark Spanbroek
2020-09-15 10:34:55 +02:00
parent 01eda24799
commit 1001eaf683
2 changed files with 5 additions and 2 deletions

View File

@@ -84,8 +84,8 @@ type
sin6_family*: AddressFamily
sin6_port*: Port
sin6_flowinfo*: uint32
sin6_address*: in6_addr
sin6_scopy_id*: uint32
sin6_addr*: in6_addr
sin6_scope_id*: uint32
sockaddr* {.import_sockaddr.} = object
sa_family*: AddressFamily
sa_data*: array[14, char]

View File

@@ -17,3 +17,6 @@ test "SocketAddress union":
address.address.sa_family = AF_INET
check address.ipv4.sin_family == AF_INET
check address.ipv6.sin6_family == AF_INET
test "Socketaddress can be converted to string":
discard $SocketAddress()