-
Notifications
You must be signed in to change notification settings - Fork 111
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
base: main
Are you sure you want to change the base?
Conversation
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
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() |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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
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