Skip to content

Instantly share code, notes, and snippets.

View kirk91's full-sized avatar
🎯
Focusing

kirk kirk91

🎯
Focusing
View GitHub Profile
@kirk91
kirk91 / replay-redis-request.go
Last active January 9, 2020 10:43
Replay redis request traffic
package main
import (
"bufio"
"context"
"flag"
"fmt"
"io"
"io/ioutil"
"log"
@kirk91
kirk91 / http_unix.go
Last active July 16, 2021 14:12
Http over unix domain socket
package main
import (
"fmt"
"net"
"net/http"
"os"
)
func main() {
@kirk91
kirk91 / tcp_unix.go
Last active August 9, 2020 09:33
TCP Echo over unix domain socket
package main
import (
"io"
"net"
"os"
)
func main() {
udsPath := "/tmp/tcp-unix.sock"
@kirk91
kirk91 / tcp_abstract_unix.go
Last active August 9, 2020 11:55
TCP Echo over abstract unix domain socket
package main
import (
"io"
"net"
)
func main() {
// '@' indicates the socket held in an abstract namespace
// which doesn't belong to a file in the filesystem
@kirk91
kirk91 / fd_receive.go
Last active November 30, 2022 01:31
Pass File Descriptor over Unix Domain Socket
package main
import (
"fmt"
"log"
"net"
"net/http"
"os"
"syscall"