Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ Windows session time TCP/IP API , +
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 7-Mar-12 3:02am
Comments
Nelek at 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 at 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
good
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
  Permalink  
v2

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

  Print Answers RSS
0 George Jonsson 215
1 Kornfeld Eliyahu Peter 169
2 OriginalGriff 120
3 PIEBALDconsult 110
4 BillWoodruff 85
0 OriginalGriff 6,165
1 DamithSL 4,658
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,649
4 Sergey Alexandrovich Kryukov 3,294


Advertise | Privacy | Mobile
Web01 | 2.8.141220.1 | Last Updated 7 Mar 2012
Copyright © CodeProject, 1999-2014
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