예제 #1
0
        private async void TestServer_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                //Debug.WriteLine(await ClintServerMethods.SendDataAndRecieveAnswer("localhost", 1337, "TEST REQUEST"));
                await ServerInterface.UploadFile(await StorageInterface.GetStorageFileFromToken(await StorageInterface.PickExternalStorageFile_OpenFile()), "/CODE/IMG.png");// "C:\\Users\\alder\\Desktop\\IMG.png", "localhost");

                //ServerInterface.ReadFile("invalidTestFile");//if reading a non-existent file I get 0x15 (NAK) in flags[1]
            }
            catch (Exception ex)
            {
                ex.PrintStackTrace();
            }
        }