QuestionQ37

VerifiedNetwork Interfaces

When creating a new socket with Python’s sockets module, which parameters specify that the socket will send and receive TCP traffic?

Choose two
Explanation

AF_INET specifies the IPv4 Internet address family, and SOCK_STREAM specifies a connection-oriented stream socket. Together in the standard socket.socket(AF_INET, SOCK_STREAM) configuration, with no explicit protocol number, they create a TCP socket. SOCK_DGRAM denotes datagram semantics rather than TCP, while socket.socket is the socket constructor.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!