A DDS Publisher and Subscriber are responsible for sending and receiving the data. A Publisher contains one or multiple DataWriters.
To send or receive samples from the DDS dataspace or domain, you must create a domain participant in that domain.
Unlike when creating a socket and sending a UDP packet, creating DDS entities is more heavyweight.