Skip to content

Instantly share code, notes, and snippets.

View jasonknight's full-sized avatar

Jason Martin jasonknight

View GitHub Profile
@jasonknight
jasonknight / tcp_timeout.go
Created May 16, 2018 16:08 — forked from hongster/tcp_timeout.go
Golang example on handling TCP connection and setting timeout.
package main
import (
"fmt"
"net"
"time"
"bufio"
)
func handleConnection(conn net.Conn) {