×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Oct 2008
    Posts
    4

    Question for FTP server implementation

    Hi,

    I'm working on a simple FTP server on S60. I tried to create two Active Objects (AO for short) with two socket connection, one is for command; and the other is for binary file transfer. However, only one AO would be activity at a time. I want to know whether this design is correct. Or any code fragment can be referred?

    Anyway, thanks in advance.

    Charles
    Last edited by rokaku; 2009-03-17 at 16:18.

  2. #2
    Registered User
    Join Date
    Oct 2008
    Posts
    4

    Re: Any suggestion for FTP server implementation?

    Here is the pseudo code for my question.
    Only one RunL() of CActive object will be called.
    Does anyone have any suggestion for this?
    Thanks in advance.


    class TextSocket : public CActive {
    public:
    void RunL();
    static TextSocket* NewL();
    ...
    };

    class BinarySocket : public CActive {
    public:
    void RunL();
    static BinarySocket* NewL();
    ...
    };


    class MyMain() : public CAknAppUI {
    void HandleCommandL(TInt aCommand);
    ...
    };

    void MyMain::HandleCommandL(TInt aCommand){
    ...
    BinarySocket* binarysocket=BinarySocket::NewL();
    TextSocket* textsocket=TextSocket::NewL();

    ...

    binarysocket->SetPort(3111);
    textsocket->SetPort(3222);

    binarysocket->StartListening();
    textsocket->StartListening(); //The second CActive instance is not functional. So that it can not receive any message from socket.
    ...
    }

Similar Threads

  1. Replies: 3
    Last Post: 2008-09-09, 04:53
  2. SOCKET PROGRAMMING: Client can not connect to server...
    By simbiyan in forum Symbian Networking & Messaging (Closed)
    Replies: 5
    Last Post: 2007-04-22, 20:00
  3. Gauge to monitor progress not working :(
    By mattsaccount in forum Mobile Java General
    Replies: 1
    Last Post: 2004-05-17, 02:07

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×