Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a UDP transport #397

Merged
merged 6 commits into from
Jun 10, 2020
Merged

Conversation

nkryuchkov
Copy link
Contributor

@nkryuchkov nkryuchkov commented Jun 8, 2020

Did you run make format && make check? Yes

Fixes #391

Changes:

  • Implement a UDP transport

How to test this PR:

  • Checkout skywire-services against feature/sudp
  • Run integration build
  • Run the generic integration environment
  • Run make integration-startup-sudp
  • Run curl --data {'"recipient":"'$PK_A'", "message":"Hello"}' -X POST $CHAT_C
  • Make sure that message appeared in VisorA logs

# Conflicts:
#	go.mod
#	go.sum
#	pkg/snet/network.go
#	pkg/snet/snettest/env.go
#	vendor/modules.txt
Copy link
Contributor

@Darkren Darkren left a comment

Choose a reason for hiding this comment

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

Just a couple of minor questions. Otherwise - great job!

pkg/snet/network.go Outdated Show resolved Hide resolved
}

if lAddr, rAddr, err = origin(conn, deadline); err != nil {
err = HandshakeError(err.Error())
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't we return here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Darkren I guess we should. I copied it from stcp with no changes. @evanlinjin What do you think about it?

}

hash := cipher.SumSHA256(b.Bytes())
rPK, err := cipher2.PubKeyFromSig(cipher2.Sig(sig), cipher2.SHA256(hash))
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't we handle this error?

Copy link
Contributor Author

@nkryuchkov nkryuchkov Jun 10, 2020

Choose a reason for hiding this comment

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

Same here, just copied. I'm not sure. @evanlinjin What do you think?

@nkryuchkov nkryuchkov merged commit 45f4526 into skycoin:develop Jun 10, 2020
@nkryuchkov nkryuchkov deleted the feature/sudp branch June 10, 2020 14:31
jdknives pushed a commit that referenced this pull request Oct 19, 2020
Implement a UDP transport

Former-commit-id: 45f4526
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants