Quantcast
Channel: Rebex Q&A Forum - Recent questions and answers
Viewing all articles
Browse latest Browse all 3860

How to receive bytes sent from client with SshChannel.Send() function on server?

$
0
0

Hi, im trying to send bytes from client to server with using request.exec command and channel.send function but i couldnt figure it out how to get bytes on the server. Here is my code;

Client Code;

this.Channel = this.Client.Session.OpenSession();
this.Channel.RequestExec($"DDFCRTE {Path.GetFileName(item)} {tvGosterim.SelectedNode.Tag}");
byte[] dizi = File.ReadAllBytes(item);
this.Channel.Send(dizi, 0, dizi.Count());

Server Code;

private void Server_ShellCommand(object sender, ShellCommandEventArgs e)
{
    switch (e.Command)
    {
       case "DDFCRTE":
       break;
    }
}

Viewing all articles
Browse latest Browse all 3860

Trending Articles