Click here to Skip to main content
15,921,212 members

Comments by member5320 (Top 2 by date)

member5320 3-Jul-20 0:53am View    
I've found some code in c to close the native app like this

std::string req;
//process request and send response

and this is my c# code to get the data from the browser

private static string OpenStandardStreamIn()
using var stdin = Console.OpenStandardInput();
string input = "";
int length = 0;
byte[] bytes = new byte[4];
stdin.Read(bytes, 0, 4);
length = BitConverter.ToInt32(bytes, 0);
byte[] buff = new byte[length];
stdin.Read(buff, 0, buff.Length);
input += Encoding.UTF8.GetString(buff);
return input;
member5320 2-Jul-20 1:10am View    
I just want to know when is the browser is closing and when on browser closing event the host application must also be killed.