Socket Programming Homework

Design:

The software consists of two parts. The server program and the client program. The server program
is simply a command line application that receives only one argument to specify the directory the file
server hosts. And the client program is written in Qt4 GUI framework, so a friendly visual user
interface is shown to the user.

Functions:

1. Listing directories from server.
2. Downloading files from server. Large files (4GB) are supported.
3. Multi-clients access and multi-threading supported.
4. Uses maximum network speed, nearly 50Mbytes/s transfer ability on PC.
5. The cross-platform Qt4 GUI supported.
6. Current version only support two basic FTP commands(LIST, RETR) for file listing and file
transferring. To simplify the development, the implementation of these commands is not
compatible with the RFC related specificiations.

Environment:

IDE: vim
Language: C++
GUI Framework: Qt4
Networking Library: socket API of the operating system.

Screenshot

源代码下载:
socket.tar

Socket Programming Homework》有12个想法

    1. Xiaoxia 文章作者

      呃,除了几个中文字,其他的都是复制粘贴的。

      如果大家支持,以后我博客只写英文文章都可以的哦 😀

      回复
  1. bluefoxah

    看到小虾,服务端还是使用的多线程来处理的,为什么不考虑使用select或者epoll来处理呢?

    回复
    1. Xiaoxia 文章作者

      有想过这个问题,但是处理起来很复杂。额,目前还觉得没必要为了一个作业去搞的头都大了……
      多线程的程序写起来思路会清晰些,效率也高些,真的哦!

      回复
      1. bluefoxah

        linux下多线程并不是那么完美,用轻量级线程模拟出来的。看现在的一些开源库,有很多都是使用单线程的,redis,libevent,个人愚见。。。

        回复

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据