mirror of
https://github.com/bettercap/bettercap
synced 2025-07-11 15:46:59 -07:00
misc: decoupled session record loading to external package
This commit is contained in:
parent
b743b26dde
commit
126cb7febf
78 changed files with 2063 additions and 490 deletions
26
vendor/github.com/mdlayher/raw/timeout_bsd.go
generated
vendored
Normal file
26
vendor/github.com/mdlayher/raw/timeout_bsd.go
generated
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
// +build darwin dragonfly freebsd netbsd openbsd
|
||||
|
||||
package raw
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
const (
|
||||
// Maximum read timeout per syscall.
|
||||
// It is required because read/recvfrom won't be interrupted on closing of the file descriptor.
|
||||
readTimeout = 200 * time.Millisecond
|
||||
)
|
||||
|
||||
// Copyright (c) 2012 The Go Authors. All rights reserved.
|
||||
// Source code in this file is based on src/net/interface_linux.go,
|
||||
// from the Go standard library. The Go license can be found here:
|
||||
// https://golang.org/LICENSE.
|
||||
|
||||
// Taken from:
|
||||
// https://github.com/golang/go/blob/master/src/net/net.go#L417-L421.
|
||||
type timeoutError struct{}
|
||||
|
||||
func (e *timeoutError) Error() string { return "i/o timeout" }
|
||||
func (e *timeoutError) Timeout() bool { return true }
|
||||
func (e *timeoutError) Temporary() bool { return true }
|
Loading…
Add table
Add a link
Reference in a new issue