Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/database64128/tfo-go

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/database64128/tfo-go

  • v1.1.2
  • Source
  • Go
  • Socket score

Version published
Created
Source

tfo-go

Go Reference Test

tfo-go provides a series of wrappers around net.ListenConfig, net.Listen(), net.ListenTCP(), net.Dialer, net.Dial(), net.DialTCP() that seamlessly enable TCP Fast Open. These wrapper types and functions can be used as drop-in replacements for their counterparts in Go net with minimal changes required.

tfo-go supports Linux, Windows, macOS, and FreeBSD. On unsupported platforms, tfo-go automatically falls back to non-TFO sockets and returns ErrPlatformUnsupported. Make sure to check and handle/ignore such errors in your code.

⚠️ Limitations

  1. On Windows, all operations on a TFO-enabled connection will block the current goroutine thread, because there's no way for tfo-go to utilize Go's runtime poller on Windows. For real world applications with a fairly low number of connections, tfo-go will work just fine. If your application needs to handle a lot of concurrent I/O, just don't use Windows!
  2. FreeBSD code is completely untested. Use at your own risk. Feedback is welcome.

FAQs

Package last updated on 21 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc