Siddarth Kumar 926f6a3c72 Revert "test: bump go-libp2p"
This reverts commit d0ca4447c6c5642830354740d045f453eb3e77e8.
2024-01-18 20:29:33 +00:00

20 lines
410 B
Go

package dtls
import (
"context"
"net"
)
// Resume imports an already established dtls connection using a specific dtls state
func Resume(state *State, conn net.Conn, config *Config) (*Conn, error) {
if err := state.initCipherSuite(); err != nil {
return nil, err
}
c, err := createConn(context.Background(), conn, config, state.isClient, state)
if err != nil {
return nil, err
}
return c, nil
}