Delphi-Kylix
  Home arrow Delphi-Kylix arrow Page 2 - Building an Internet Access Control Applic...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
DELPHI-KYLIX

Building an Internet Access Control Application
By: David Web
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2008-08-18

    Table of Contents:
  • Building an Internet Access Control Application
  • The Protocol
  • The Server Application
  • Client Application

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Building an Internet Access Control Application - The Protocol


    (Page 2 of 4 )

    The indy components that we will be using make it easy to create a custom protocol. We will be using two components, called idCmdTCPClient and idCMdTCPServer, that provide the medium for us to create our own communication protocol. Because we’ve looked at the requirements for the applications involved, we already have an idea of how the communication should go.

    First, the Client Application contacts the server application and connects, giving its name. For example, if the client computer is called Joe Blogg, then it will try to give that name to the server application. At this point the server should actually check to see if the name already exists and then send an appropriate error message back. This is of course dependent on whether you are actually going to use this application for the purpose that it is designed (to control access to the Internet), in which case all the computers that are connected to the network will already have unique names. Also with the name is included another piece of status information, which tells the server that the connecting client is available. So the total sum of the communication sent by the client should be something like this:

    computername status:free

    The second step involves the Server. Since the communication from the client will be two parts (name and status), the server takes that communication and breaks it up into the individual two parts. At the same time the server takes the IP address of the connecting client as well as the time of connecting. So something like this takes place on the server:

    server: name OK

    status OK

     

    If not OK then

    send appropriate message to client and disconnect


    Finally, once the connection is successful then all communication from here on in will be initiated by the server application. For example, to tell a client to grant access for ten minutes, the server would send the following communication:


    activate:workstation@10


    The above statement says: activate the computer that has the name "workstation" for ten minutes. The client application receives this string, breaks it up into three pieces, and gives it to the relevant functions for further processing.

    More Delphi-Kylix Articles
    More By David Web


     

    DELPHI-KYLIX ARTICLES

    - Loading an XML Document into the DOM
    - Delphi Wrapper Classes and XML
    - Delphi and the DOM
    - Delphi and XML
    - Internet Access: Client Service
    - Finishing the Client for an Internet Access ...
    - The Client for an Internet Access Control Ap...
    - User Management for an Internet Access Contr...
    - Important Procedures for an Internet Access ...
    - Server Code for an Internet Access Control A...
    - Constructing the Interface for an Internet A...
    - Building a Server Application for an Interne...
    - Building an Internet Access Control Applicat...
    - Client Dataset: Working with Data Packets an...
    - Using the Client Dataset in an N-Tiered Appl...







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
    Stay green...Green IT