Skip to content
This repository has been archived by the owner on Jan 7, 2023. It is now read-only.

Add openssl.DialTimeout(network, addr, timeout, ctx, flags) call #26

Merged
merged 1 commit into from
Jun 3, 2022

Conversation

oleg-jukovec
Copy link

  • this is an analog for net.DialTimeout call
  • the timeout is only for net.Dial call
  • the timeout does not include OpenSSL calls

- this is an analog for net.DialTimeout call
- the timeout is only for net.Dial call
- the timeout does not include OpenSSL calls
@BigLep
Copy link

BigLep commented May 27, 2022

@oleg-jukovec : what's your usecase for this?

@oleg-jukovec
Copy link
Author

I need to establish a connection with a timeout.

Copy link

@MarcoPolo MarcoPolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good except one question. Thanks for following what net does here.

//
// See func Dial for a description of the network, addr, ctx and flags
// parameters.
func DialTimeout(network, addr string, timeout time.Duration, ctx *Ctx,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why omit the session param?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A reason is same as for regular Dial:

return DialSession(network, addr, ctx, flags, nil)

There is no need for this.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see. Thanks

@MarcoPolo MarcoPolo merged commit e25825b into libp2p:master Jun 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants