Skip to content

Is it a better practice to actively close the socket when the forwarded-tcpip channel receives an EOF? #1754

Description

@canzu

My server program uses this library to perform remote port forwarding with an SSH forwarding server. The client connects to the server through the SSH forwarding server. I need to close the session between the client and the server when the client actively closes the socket. Currently, the library only closes after a timeout. When I modify ChannelForwardedTcpip to add EndOfData handling, I can achieve the desired effect, as shown in the diagram. Could this modification cause any problems? For example: frequent creation and destruction of channels affecting performance? Resources not being properly released? Data not being fully transmitted before closing?
Image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions