PSPriyansh Saoinpriyanshsao.hashnode.dev·Aug 23, 2025 · 3 min readManaging Temporary Errors During TCP Data Transmission in GoSimulating Temporary Network Failures in Go When writing to a network connection, sometimes you hit temporary errors (like a slow network or dropped packets). A good practice is to retry a few times before giving up. The code below shows how to mock ...00
PSPriyansh Saoinpriyanshsao.hashnode.dev·Aug 17, 2025 · 2 min readHow to Use Go Scanner for Delimited TCP DataThis program creates a small TCP server and client inside the same application. The server sends a text message to the client. On the client side, the connection is wrapped in a scanner which reads the incoming stream and splits it into words (using ...00
PSPriyansh Saoinpriyanshsao.hashnode.dev·Aug 15, 2025 · 2 min readLearn Kubernetes: A Step-by-Step Beginner's Guide, Part 2An application needs to tick a few boxes to run on a Kubernetes cluster. These include. 1. Packaged as a container 2. Wrapped in a Pod 3. Deployed via a declarative manifest file Let’s say we already have our microservices written in our favorite pro...00
PSPriyansh Saoinpriyanshsao.hashnode.dev·Aug 15, 2025 · 3 min readSending Data to a TCP Client Using GOpackage main import ( "crypto/rand" "errors" "fmt" "net" "io" ) func main() { // creating a payload payload := make([]byte, 1<<24) //size is 16MiB _, err := rand.Read(paylo...00
PSPriyansh Saoinpriyanshsao.hashnode.dev·Aug 15, 2025 · 4 min readHow to Efficiently Manage TCP Connection Deadlines with the Ping Pong Method in Gopackage main import ( "context" "errors" "fmt" "io" "log" "net" "time" ) // creating a default interval const defInterval = 1 * time.Second // pinger periodically writes "ping" to the Writer. // The interval can be chang...00