I am not sure I understand the terminology you are using but the Particle Cloud protocol using CoAP can be carried on either TCP or UDP. Each has its tradeoffs and so in general TCP is used with the WiFi products like Photon and UDP is used with the cellular products like Electron.
The internal Particle cloud connection does not use the Arduino interface that you pointed to the doc for above–that is for you as programmer to create your own UDP connections to other hosts. It uses a similar but lower level interface.
There is a way to convert an Electron to use TCP but it will use more cellular data. The public key of the Particle cloud is also different for UDP vs. TCP. The CLI is the best way to change this.
I’m not entirely certain this is relevant to your project, but just in case I’ll mention it:
UDP behaves a little differently than you might expect on the Electron because of the way mobile carriers run their networks. In particular, your Electron does not have its own unique IP address assigned to it. The IP address is shared with many other mobile users, and port mapping is used, similar to how a home network shares an IP address. This isn’t specific to the Electron; it applies to your phone as well.
Because of this, even though you can query your public IP address, you cannot make connections out of the blue to a TCPServer or UDP listener running on an Electron, because the mobile carrier has not set up a port mapping for it. There’s no way around that.
If you first send an outgoing UDP request, however, it is possible to receive a UDP response back for a short period of time. This allows most UDP protocols like DNS to work properly. One important thing if you’re writing your own server: Make sure you respond to the port the request came from, not the port you are listening on on the Electron. Because of the port mapping they won’t be the same. The amount of time the mapping is kept active varies by carrier, about 23 minutes for a Particle SIM to 30 seconds for some carriers.