Click here to Skip to main content
15,899,475 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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
Hour.

So my question is: Can anybody help me with points D and E please.
Posted
Comments
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

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
 
Share this answer
 
v2

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900