Home arrow Delphi-Kylix arrow Important Procedures for an Internet Access Control Application

Important Procedures for an Internet Access Control Application

In the preceding article we started to explore the code that makes up the server communication. If you havenít read that article, please make sure to do so, because almost everything that I will be discussing in this article will directly reference code that we discussed there. A lot of the things that we will be discussing here will make sense once you have read the previous article.

Author Info:
By: David Web
Rating: 5 stars5 stars5 stars5 stars5 stars / 7
September 15, 2008
  1. · Important Procedures for an Internet Access Control Application
  2. · Taking Names
  3. · Disconnecting from the Server
  4. · The tsExecute Procedure
  5. · Suggested Improvements

print this article

Important Procedures for an Internet Access Control Application
(Page 1 of 5 )

The three procedures

There are three more procedures that we must look at before we conclude the server portion of this article, because they are also essential to the overall functionality of the server program. The first of the three procedures deals with what happens when a workstation registers with the server at startup:

procedure TForm1.tsConnect(AContext: TIdContext);




If you look back at the discussion that we had about the TIdContext class, and take a closer look at the constructor creation procedure, you will note that the properties and methods of the TidContext class were inherited by the TMyContext object. This means that we will be able to access all the properties of the context class through the TMyContext object by using the dot notation.

For example, to access the compname property of the object, we simply type TMyContext(AContext).compname.In other words, every client or workstation that connects will be given its own context in which their communication with the server will take place. It is also at this point that the context class sets up the context list that is updated as workstations connect to the server:

with TMyContext(AContext) do


The function takes the current time:


Then it checks to see if the client is connected by examining the socket property of the connection:

if (Connection.Socket <> nil) then

If the socket indicates that there is a client connected, then the client IP address is taken: 

IP :=Connection.Socket.Binding.PeerIP;

blog comments powered by Disqus

- 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...

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials