[³×Æ®¿öÅ© ÇÁ·Î±×·¡¹Ö] FTP ¼¹ö ¼Ò½º ¹× ºÐ¼® 
³×Æ®¿öÅ© Term Project ÀÔ´Ï´Ù.
°£´ÜÇÑ FTP ¼¹ö¿Í Ŭ¶óÀÌ¾ðÆ®¸¦ ±¸ÇöÇÑ °ÍÀÔ´Ï´Ù.
¼Ò½º´Â Á¦°¡ ¿©·¯¹ø È®ÀÎÀ» ÇѰŶó È®½ÇÇÕ´Ï´Ù. °°Àº ·£¾È¿¡¼ µ¹¾Æ°¡´Â °ÍÀÌ´Ï ÁÖÀÇÇϽʽÿä. ¸¸¾à ±×·¸Áö ¾ÊÀ¸¸é, ÇÑ´ë¿¡¼µµ ½ÇÇèÀ» ÇÒ ¼ö ÀÖ½À´Ï´Ù. ¼Ò½º´Â ÇÑ±Û ¹®¼¿¡ Àִ°Šº¹»çÇØ¼ ÇÏ½Ã¸é µÇ°í¿ä. ÁÖ¼®ÀÌ Àß µÇ¾î ÀÖ¾î¼ ¾Ë¾Æº¸½Ã±â ÆíÇÏ½Ç °Ì´Ï´Ù. ±×·³.. ¼ö°íÇϼ¼¿ä. A+¹ÞÁö ¾ÊÀº °ú¸ñÀº ¿Ã¸®Áö ¾Ê½À´Ï´Ù.
1. server ÂÊ ¼Ò½º
2. client ÂÊ ¼Ò½º
3. ÇÁ·Î±×·¥ °á°ú ºÐ¼®
if (!strcmp(dir,"put")) { //
szbuffer[0] = '1'; // indicate it's a data packet
// now, start to read and send file
int num_read = 0;
do {
num_read=fread(szbuffer+3, 1, SIZE, my_in_file); // Àü¼ÛÇÒ ÆÄÀÏÀ» szbuffer·Î ÀÐ¾î µéÀδÙ.
filesize+=num_read; // ÆÄÀÏÀÇ Å©±â¸¦ °è»êÇϱâ À§ÇØ ÀоîµéÀÎ ÆÄÀÏÀÇ ¹ÙÀÌÆ®¼ö¸¦ ÀúÀå
if (num_read <= 0) { // last packet
// ¶ó½ºÆ® ÆÐŶÀÎ °æ¿ì ÆÐŶÀÇ ½ÃÀÛ ¹øÈ£¸¦ 2¹øÀ¸·Î ÇØ¼ Àü¼ÛÇÑ´Ù.
szbuffer[0] = '2'; // indicate the last data packet
cout << "File transfer completed." << endl;
cout << "The size of transfered file are " <<filesize<<endl<<endl;
} else {
//size of data
szbuffer[0]='1';
szbuffer[1]=num_read

