Socket Workflows
NetShield currently offers two approaches for interacting with a server: a managed workflow (recommended), and a Bare Bones workflow (for advanced users). The Managed workflow creates a socket in a separate task(/thread), that notifies you when new data is available to be processed, and allows you to request writes to the server. This approach is the easiest way to connect to a server, and therefore the recommended way.
The bare bones approach gives the socket operations themselves. This means you are responsible for ensuring data is available before reading, closing the socket when you’re done, and all of those things. This means that one mistake could lead to your game hanging or crashing. Please use caution when using bare bones sockets, and make sure you’re acquainted with the way (POSIX) sockets work before continuing. If you’re new to sockets, we highly recommend the managed workflow.
📄️ Managed Workflow
NetShield's managed workflow takes care of managing the TCP/TLS connection for you. This is the easiest way to get started messaging your server.
📄️ Bare-bones Workflow
"Bare Bones" Workflow