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

RSDK-9780 - Tunneling over grpc #4745

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

RSDK-9780 - Tunneling over grpc #4745

wants to merge 4 commits into from

Conversation

cheukt
Copy link
Member

@cheukt cheukt commented Jan 24, 2025

still working on a small test for the helpers, but wanted to get some feedback early

I was able to run a server on windows and use remote desktop with no issues.

Also able to share both reader/sender and receiver/writer loops in the client/server implementations.

corresponding API PR at viamrobotics/api#623

works better

working checkpoint

update go mod

another checkpoint

cleanup

fix go mod

fix

parse

refactor

minor

refactor

move tunnel example, final set of changes

move log location

some fixes

doc
@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label Jan 24, 2025
cancel()
// We do close the connection to unblock the reader/sender loop, which is not clean
// but there isn't a cleaner way to exit from the reader/sender loop.
err = conn.Close()
Copy link
Member Author

Choose a reason for hiding this comment

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

I don't like that I have to close the connection here in order for reader.Read in ReaderSenderLoop to exit, but not sure if there are better options here.

@@ -1190,6 +1192,64 @@ func (rc *RobotClient) Version(ctx context.Context) (robot.VersionResponse, erro
return mVersion, nil
}

// Tunnel tunnels data to/from the read writer from/to the destination port on the server. This
// function will close the connection passed in as part of cleanup.
func (rc *RobotClient) Tunnel(ctx context.Context, conn net.Conn, dest int) error {
Copy link
Member Author

Choose a reason for hiding this comment

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

I may add this to the Robot interface, but since this is only useful in the client and doesn't touch the Robot in anyway, I'm inclined to keep it out for now

@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Jan 24, 2025
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to test This pull request is marked safe to test from a trusted zone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants