Skip to content

Instantly share code, notes, and snippets.

View zxc111's full-sized avatar
💭
I may be slow to respond.

zxc111

💭
I may be slow to respond.
View GitHub Profile
@hongster
hongster / tcp_timeout.go
Created October 2, 2015 11:30
Golang example on handling TCP connection and setting timeout.
package main
import (
"fmt"
"net"
"time"
"bufio"
)
func handleConnection(conn net.Conn) {