# Type Description # SOCK_STREAM Opens an existing file for reading. # SOCK_DGRAM Opens a file for writing. # SOCK_RAW Opens an existing file for updating, keeping the existing contents intact. # SOCK_RDM Opens a file for both reading and writing. The existing contents are kept intact. # SOCK_SEQPACKET Opens a file for both writing and reading. The existing contents are deleted.