|
dsSocket
Sample Applications
The
sample applications are available as Visual Basic 6.0 projects except
where noted. You are free to use the sample source code in your
applications provided that your application is using dsSocket. The
sample code may not be redistributed, either in whole or in part,
without obtaining permission from Dolphin Systems Inc.
Using
WithEvents with dsSocket to encapsulate a protocol
Download
The
dsHttp sample application illustrates creating a VB Class Module
that encapsulates a protocol. The sample class provides a method
that accepts a URL and a filename. Using the HTTP protocol the class
retrieves a file and saves it to the specified disk filename. An
event is fired when the page retrieval is complete. The sample requires
the latest version of dsSocket that can be created as an object.
Client/Server
Chat Sample
Download
The
dsChat sample applications illustrates creating both client and
server connections. To use the application run two instances of
dsChat.exe, either on different computers or the same computer.
On one instance enter a port number (eg:100) and click "Wait
for Chat". This will be the server instance. On the other instance
enter a server name or address and the same port as on the first
instance. When you click "Chat Someone" the two instances
of dsChat will be connected as shown in the status bar. You can
now type into the upper message window on one instance and have
it appear on the other instance when you hit the Enter key.
Send
a message to a server and back
(Visual Basic Source)
Download
The
Echo sample application will attempt a connection to the specified
server using port 7 or the "echo" service name. When the
connection is complete it will send a message and expect to get
the same message back. Most Unix systems will support echo connections.
A Windows NT system will support echo if the Simple TCP/IP Services
are installed. The Echo sample can be used to test for compatability
between your system and dsSocket.
Send
a message to a server and back
(Visual C++ Source)
Download
The
Echo sample application will attempt a connection to the specified
server using port 7 or the "echo" service name. When the
connection is complete it will send a message and expect to get
the same message back. Most Unix systems will support echo connections.
A Windows NT system will support echo if the Simple TCP/IP Services
are installed. The Echo sample can be used to test for compatability
between your system and dsSocket.
Sending
SMTP EMail with dsSocket
Download
The
dsMail sample application will connect to a mail server and send
an email message using the Simple Mail Transfer Protocol (SMTP).
The sample code can be used as a basic for a more robust implementation
of SMTP. Limited error handling is provided in the application.
Further information on SMTP can be obtained by reading RFC821.
Accessing
a WhoIs Server with dsSocket
Download
The
WhoIs sample application will accept a domain name such as "microsoft.com"
and query a whois server for information regarding that domain.
This application was written by Rob Lerner as is posted here with
his permission.
Accessing
a Web Server with dsSocket
Download
The
dsWeb sample application will accept a URL and download the associated
HTML file from the Web Server. The HTML file is displayed in a list
box. This sample illustrates using the HTTP GET command. Routines
are included to extract a hostname and filename from the supplied
URL.
Sending
a Network Ping using ICMP.DLL
Download
The
dsPing sample application uses the ICMP.DLL that is supplied with
Windows 95 and Windows NT to implement a TCP/IP network ping. The
return status indicates whether the remote machine exists on the
network.
Visual
Basic Module (.BAS) for Constants
Download
These
files contain the global constants for the Action and State properties.
In addition the numerical constants for the error messages are provided.
|