Cosmos
Cosmos copied to clipboard
FTP Connection reset
Area of Cosmos - What area of Cosmos are we dealing with?
FTP Server
Expected Behaviour - What do you think that should happen?
Succeful connect to FTP server and get files
Actual Behaviour - What unexpectedly happens?
Conection closed by server
Reproduction - How did you get this error to appear?
Start FTP server and connect.
Version - Were you using the User Kit or Dev Kit? And what User Kit version or Dev Kit commit (Cosmos, IL2CPU, X#)?
last
Unfortunately, I have to ask for help here again. This time, I faced such a problem that the ftp server drops the connection when I try to connect to it. I use virtual box and dynamic ip obtained via DHCP. For connection i used FileZilla.
FileZilla settings:

Error:

P.S I created this here in order to get an answer faster. I apologize in advance.
My code:
protected override void BeforeRun()
{
try
{
var fs = new Sys.FileSystem.CosmosVFS();
Sys.FileSystem.VFS.VFSManager.RegisterVFS(fs);
foreach (var disk in Sys.FileSystem.VFS.VFSManager.GetDisks())
{
//disk.CreatePartition(50*1024*1024);
//disk.MountPartition(1);
disk.DisplayInformation();
// disk.FormatPartition(2, "FAT32");
}
var available_space = fs.GetAvailableFreeSpace(@"0:\");
Console.WriteLine("Available Free Space: " + available_space);
var xClient = new DHCPClient();
if (xClient.SendDiscoverPacket() != -1)
{
xClient.Close();
Console.WriteLine("Configuration applied! Your local IPv4 Address is " + NetworkConfiguration.CurrentAddress.ToString() + ".");
}
else
{
xClient.Close();
}
var fs_type = fs.GetFileSystemType(@"0:\");
Console.WriteLine("File System Type: " + fs_type);
Console.ForegroundColor = ConsoleColor.DarkBlue;
Console.Write("IP: ");
Console.WriteLine(NetworkConfiguration.CurrentAddress.ToString());
using (var xServer = new FtpServer(fs, @"0:\"))
{
/** Listen for new FTP client connections **/
xServer.Listen();
}
}
catch (Exception e){
Console.WriteLine(e);
}
Console.WriteLine("Cosmos booted successfully. Type a line of text to get it echoed back.");
}
P.S Firewall is disabled for all networks.
Have you portforwarded your router? that could help a bit Oh, and if you're running the ftp in a vm, you have to connect with the vm's IP (google up how to do that)
Are you blocking max simultaneous connections to one? Closing for now since there is many new changes on TCP and FTP