The SocketTools Visual Edition provides a comprehensive
collection of ActiveX controls for performing a variety of Internet
related programming tasks. Although the number of properties,
methods and events may appear daunting, once you begin using
SocketTools in your own applications you'll find that the various
controls are designed to work together in a cohesive fashion. After
you've familiarized yourself with one control, the others will
become much simpler to use.
Throughout the Developer's Guide there are some general concepts
and terminology used that are essential to understanding how
SocketTools works. Each of these concepts is explored in detail,
however a general, broad overview can also be useful when you are
just getting started.
Protocols
A protocol, in terms of how the word is used in SocketTools,
refers to the rules for how programs communicate with one another
over a network. There are low level networking protocols such as
TCP and UDP, as well as high level application protocols like FTP
and HTTP. It can be helpful to think of a protocol as a sort of
language; for two programs to communicate with each other, they
must agree upon a protocol and understand how it is
implemented.
Connections
The process of establishing a connection enables one program to
communicate with another. Connection requests are made by client
applications, and accepted by server applications. When the server
accepts the connection request, the connection is completed. When
you use the Connect method to successfully establish a connection
to a server, a client session is created. SocketTools uses a
one-to-one relationship between an instance of a control and a
client session. By creating multiple instances of a control, an
application can create multiple client/server sessions if
necessary.
Sessions
A session refers to an active connection between a client and
server program. This term is typically used interchangeably with
connection; however in some cases a single session may involve
multiple network connections. For example, the File Transfer
Protocol control establishes one connection, called the command
channel, when the client initially connects to the server. However,
when a file is being uploaded or downloaded, a second connection
called the data channel is created just for that transfer. When the
transfer completes, the second connection is terminated while the
original command channel connection remains active. Even though
there are multiple connections being made, SocketTools considers it
to be a single client session. An active session is referenced by
the instance of the control that was used to create the session.
When the session is no longer needed, the control's Disconnect
method will terminate the connection to the server and release the
resources allocated for that session. After that point, the session
is no longer valid and subsequent function calls using the control
cannot be made until another connection is established.
Authentication
Many servers require that clients authenticate themselves by
providing user names and passwords. Different application protocols
implement several different types of authentication, and some
protocols may support more than one authentication method.
SocketTools provides one of two general types of authentication
methods, depending on the protocol. For protocols which require the
client to authenticate itself, the controls will provide a Login
method. For protocols where authentication is optional, the
controls will provide an Authenticate method. Refer to the
technical reference for the specific protocol to determine if
authentication is required.
Events
Developers who use programming languages such as Visual Basic
will find the concept of events and event handling to be very
familiar. In general terms, the SocketTools documentation uses
"event" to refer to a mechanism where the control notifies the
application that an operation has completed, some action has taken
place or a change in status has occurred. One example of an event
is a connection event, which is generated whenever an asynchronous
network connection is completed by the client. Another example is a
progress event, which is generated periodically by the control to
inform the client of its progress as it sends or receives data. To
determine what events are available in a specific control, refer to
the documentation. More specific information about event handling
is provided later in this guide.