Ejemplo n.º 1
0
 public void TestSendDataBlock()
 {
     client.sendWriteRequest(remotePath, localPath, TFTPClient.Modes.Octet, out sndBuffer);
     client.receiveACK(out rcvBuffer);
     client.sendDataBlock(localFile, out sndBuffer);
     Assert.AreEqual(TFTPClient.FSM_Modes.DATA_SENT, client.tftpClientMode);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Send Data Block. ACK_RECEIVED --> DATA_SENT.
        /// </summary>
        /// <param name="fileStream">The file stream for writting the downloading file.</param>
        /// <param name="sndBuffer">The returned sending buffer.</param>
        public static void sendDataBlock()
        {
            string       localFile  = "C:\\Users\\Matt McCormick\\Documents\\Schoolwork\\cs490st\\project01\\SpecExplorer2\\local.txt";
            BinaryReader fileStream = new BinaryReader(new FileStream(localFile, FileMode.Open, FileAccess.Read, FileShare.ReadWrite));

            byte[] sndBuffer;
            client.sendDataBlock(fileStream, out sndBuffer);

            state = client.tftpClientMode;
        }
Ejemplo n.º 3
0
 public static void SendDataBlock()
 {
     clnt.sendDataBlock(localFile, out sndBuffer);
 }