Click here to Skip to main content
13,096,798 members (83,760 online)
Rate this:
Please Sign up or sign in to vote.
Hi All,
I am writing a code to implement FTP Client-Server which have the methods for
1. Client Username-Password Authentication.
2. Downloading A File.
3. Uploading A File.

Now the steps in which my code should work is:
A. Server keeps in memory the Username-Password Pair.
B. Each Username is associated with a different folder/path in server from where it
have access.
C. Server keeps in memory the Username-Path Pair.
D. After authentication of a Username, Server will create a Session-ID to be
associated with the specific Client.
E. Server will create a timer which will be updated each time the client requests the
server OR will delete the Session-ID if timer have not been updated for last 1

So my question is: Can anybody help me with points D and E please.
Posted 7-Mar-12 2:02am
Nelek 7-Mar-12 9:26am
Have you already tried it on your own? What have you done so far? Where are you getting stuck?
abhineet.ayan.verma 7-Mar-12 9:34am
I cant think of any API for creating session-id and i dont have any idea how to keep a timer going on. Help me .

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I dont think you need to create any session id for this. in http protocol session is important to identify the user. cause after transferring data between server and client the connection is terminated. but in case FTP it close its connection when it get an exit request from client.

But if you want to enable timing issue then its a different issue. By timing i mean 'Disconnection inactive user'

you should take a look at select[^] function can disconnect at in active user

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.170813.1 | Last Updated 7 Mar 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100