This repository has been archived by the owner on May 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
7 changed files
with
996 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,15 @@ | ||
// Deprecated: This package has moved into go-libp2p as a sub-package: github.com/libp2p/go-libp2p/p2p/net/pnet. | ||
package pnet | ||
|
||
import ( | ||
"errors" | ||
"github.com/libp2p/go-libp2p/p2p/net/pnet" | ||
"net" | ||
|
||
ipnet "github.com/libp2p/go-libp2p-core/pnet" | ||
) | ||
|
||
// NewProtectedConn creates a new protected connection | ||
// Deprecated: use github.com/libp2p/go-libp2p/p2p/net/pnet.NewProtectedConn instead. | ||
func NewProtectedConn(psk ipnet.PSK, conn net.Conn) (net.Conn, error) { | ||
if len(psk) != 32 { | ||
return nil, errors.New("expected 32 byte PSK") | ||
} | ||
var p [32]byte | ||
copy(p[:], psk) | ||
return newPSKConn(&p, conn) | ||
return pnet.NewProtectedConn(psk, conn) | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"version": "v0.2.0" | ||
"version": "v0.3.0" | ||
} |