Would you consider adding LocalIP (and LocalPort defaulting to 0) property to the ConnectInfo? I have a multi-IP server and need to bind to a particular IP for the SFTP to go thru the firewall.
I know that Socket.Bind is not supported by all target frameworks.
I ended up modifying the ConnectInfo with the two properties, the PasswordConnectionInfo to add the necessary constructors, the Session.SocketConnect to optionally construct an IPEndPoint and the SocketAbstraction.Connect to pass the local EndPoint and do a socket.Bind.
I used FEATURE_SOCKET_SYNC to surround the socket.Bind to make the code compile.
Of course this is a hack for my needs only.
Hi,
Would you consider adding LocalIP (and LocalPort defaulting to 0) property to the ConnectInfo? I have a multi-IP server and need to bind to a particular IP for the SFTP to go thru the firewall. I know that Socket.Bind is not supported by all target frameworks.
I ended up modifying the ConnectInfo with the two properties, the PasswordConnectionInfo to add the necessary constructors, the Session.SocketConnect to optionally construct an IPEndPoint and the SocketAbstraction.Connect to pass the local EndPoint and do a socket.Bind. I used FEATURE_SOCKET_SYNC to surround the socket.Bind to make the code compile. Of course this is a hack for my needs only.