Posted: Wed Dec 03, 2008 11:08 am Post subject: [C#] HaTransfer: easily transferring files between computers
made this one mostly for personal use (i have two computers and i wanted a simple way to transfer files between them) and decided to share it since i already made it anyway.
how2use:
1.run the attached software on both computers.
2.on the computer that is receiving the files select Server Options --> open server
3. on the computer that is sending the files enter the 1st computer's ip in the "IP" box and enter 1337 in the "Port" box (the default port, can be modified in the source). then select Client Options --> connect, and Client Options --> send file. you will be prompted to select a file (dont try to transfer 100mb files, kk? the default buffer length is 5mb, since over this size its faster to just use a usb stick)
4.the server computer will be prompted to save the transferred file.
Attached: source code and compiled binary.
also, if you want to learn about using sockets in .NET i would recommend going to this site. it helped me making this software in many ways.
The Extension 'rar' was deactivated by an board admin, therefore this Attachment is not displayed.
Last edited by Habufe on Thu Dec 04, 2008 8:56 am; edited 1 time in total
Unfortunately I'm unable to load the project file. When i try to, an error stating that it cannot find the import "C:\Microsoft.CSharp.targets" pops up. Do you have any idea why this is?
Edit: i didn't found out why this occured, but i did find a solution to the problem: Open the csproj file in note pad, and find this line of code
Posted: Sun Mar 08, 2009 7:57 pm Post subject: about buffer
you shouldn't set a large buffer size to recieve a file "at once". this is really impractical. consider using a 1KB buffer and appending each shipment to a file. send a few null bytes at the end so you know when you're finished.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum