/// <summary> /// Send Write Request. Create the WRQ packet, send it to the server. INIT --> WRQ_SENT. /// </summary> /// <param name="remoteFile">The remote file.</param> /// <param name="localFile">The local file.</param> /// <param name="tftpMode">The TFTP mode.</param> /// <param name="sndBuffer">The returned sending buffer.</param> public static void sendWriteRequest() { 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.sendWriteRequest("remote.txt", "local.txt", TFTPClient.Modes.NetAscii, out sndBuffer); state = client.tftpClientMode; }
public void TestPutFineWrapper() { client.sendWriteRequest(remotePath, localPath, TFTPClient.Modes.Octet, out sndBuffer); client.Put(remotePath, localPath, TFTPClient.Modes.Octet); FileAssert.AreEqual(localPath, serverPath + remotePath); }
public static void StartWrite(int SelMode) { clnt.sendWriteRequest(remotePutPath, localPutPath, (TFTPClient.Modes)SelMode, out sndBuffer); }