
Product
/Security News
Introducing Socket Calm: A Syntax Highlighting Theme for VS Code, Vim, and Neovim
Socket Calm is a free, open source syntax highlighting theme for VS Code, Vim, and Neovim, inspired by Socket's design system.
ghproxy-9d2.pages.dev/hslam/splice
Advanced tools
Package splice wraps the splice system call.
go get github.com/hslam/splice
import "github.com/hslam/splice"
package main
import (
"fmt"
"github.com/hslam/splice"
"io"
"net"
"time"
)
func main() {
contents := "Hello world"
lis, err := net.Listen("tcp", ":9999")
if err != nil {
panic(err)
}
defer lis.Close()
done := make(chan bool)
go func() {
conn, _ := lis.Accept()
defer conn.Close()
time.Sleep(time.Millisecond * 100)
if _, err := splice.Splice(conn, conn, 1024); err != nil && err != io.EOF {
panic(err)
}
close(done)
}()
conn, _ := net.Dial("tcp", "127.0.0.1:9999")
conn.Write([]byte(contents))
buf := make([]byte, 64)
n, _ := conn.Read(buf)
fmt.Println(string(buf[:n]))
conn.Close()
<-done
}
Hello world
This package is licensed under a MIT license (Copyright (c) 2020 Meng Huang)
splice was written by Meng Huang.
FAQs
Unknown package

Product
/Security News
Socket Calm is a free, open source syntax highlighting theme for VS Code, Vim, and Neovim, inspired by Socket's design system.

Product
Fix critical RubyGems vulnerabilities without upgrading dependencies. Free security patches are now available with more ways to install and deploy them.

Threat Research
/Security News
Socket researchers uncovered 13 malicious NuGet packages linked to fake developer job assessments, DLL side-loading, credential theft, and GitHub-based malware.