You are not logged in.
AF_INET is the socket family (IPv4), SOCK_STREAM is the type of socket (TCP).
For UDP on IPv6 you'd use AF_INET6 and SOCK_DGRAM.
Basically the type says how the socket will behave (e.g. as a stream of bytes, or as messages), while the family says what kind of network will be used for transportation.
IPv4 is AF_INET,
IPv6 is AF_INET6,
TCP is a SOCK_STREAM,
UDP is a SOCK_DGRAM.
For more info and detail, go read the socket and udp manpages. In a console type "man udp" and you'll get all info you need to create an UDP socket. If you don't have manpages, google for "man udp".