nerdexam
CompTIA

PT0-002 · Question #252

In Python socket programming, SOCK_DGRAM type is:

The correct answer is C. connectionless. In Python socket programming, SOCK_DGRAM creates a UDP (User Datagram Protocol) socket, which is connectionless - it sends datagrams without establishing a persistent connection, performing a handshake, or guaranteeing delivery. There is no session setup or teardown. This…

Tools and Code Analysis

Question

In Python socket programming, SOCK_DGRAM type is:

Options

  • Areliable.
  • Bmatrixed.
  • Cconnectionless.
  • Dslower.

How the community answered

(40 responses)
  • B
    3% (1)
  • C
    93% (37)
  • D
    5% (2)

Explanation

In Python socket programming, SOCK_DGRAM creates a UDP (User Datagram Protocol) socket, which is connectionless - it sends datagrams without establishing a persistent connection, performing a handshake, or guaranteeing delivery. There is no session setup or teardown. This contrasts with SOCK_STREAM (TCP), which is connection-oriented, reliable, and ordered. UDP/SOCK_DGRAM is not reliable (A) - packets can be lost, duplicated, or arrive out of order. 'Matrixed' (B) is not a networking term. While UDP can be faster than TCP due to lower overhead, 'slower' (D) is the opposite of its characteristic - UDP's lack of overhead makes it faster, not slower.

Topics

#Python Sockets#Networking#UDP#Connectionless Protocol

Community Discussion

No community discussion yet for this question.

Full PT0-002 Practice