Click here to Skip to main content
15,887,345 members
Articles / Desktop Programming / MFC
Article

PiGeOn mail server executable and client DLL

Rate me:
Please Sign up or sign in to vote.
3.33/5 (8 votes)
7 Apr 20053 min read 53.8K   4.4K   23   6
LAN/WAN wide task/process message server and user message function DLL

Image 1

Introduction

This is a server program that runs a service on a node on the LAN, and a DLL, PGODLL.dll (which uses BOSDLL.dll), so that user-programs, that have been built to use the functions in this DLL, may converse.

C/C++ programs include PGOmail.h, PGOcalls.h and the resource PGODLL.lib. PGOmail.h, PGOcalls.h and PGOfuncts.doc explain how it is done.

VB programs include PGODLL.bas, and use the public functions therein. PGODLL.bas and PGOfuncts.doc explain how it is done.

Installation

The DLLs

Place the file PGOdist.zip in a directory of your choice, e.g., C:\whatever. Extract Here (using unzip). Go to the directory choice\PGOw\PGOdist where you will find the file PGOdist.bat. You may wish to edit this file to reflect your preferences. Double-click on this. Unedited, this will copy PGODLL.dll (and BOSDLL.dll), into %systemroot%\system32, so that C/C++ programs can use it (them), and register them so that VB programs can use it (them).

The Service

Place the file PGOsvrDist.zip in a directory of your choice, e.g., C:\whatever. Extract Here (using unzip). Go to the directory choice\PGOw\PGOsvrDist where you will find the file PGOsvrDist.bat. You may wish to edit this file to reflect your preferences. Double-click on this. Unedited, this will create a directory C:\Program Files\Lymington and two sub-directories \Data and \Exe. Go to C:\ Program Files\Lymington\Exe where you will find the file PGOsRS.bat. You may wish to edit this file to reflect your preferences. Double-click this and/or add to Scheduled Tasks to run once at boot-up. This will run PGOs.exe on the local node. PGOs.exe may be stopped by double-clicking StopPGOsvr.exe; or, at any time, stopped, if running and restarted, by double-clicking on PGOsRS.bat.

Using the code

VC 6.0 projects: Place the PGODLL.dll in a directory on your path variable. Add the library PGODLL.lib to the project resources. Add the modules PGOmain.h and PGOcalls.h to the project. Use the routines therein.

VB 6.0 projects: Register the PGODLL.dll with regsvr32. Add the module PGODLL.bas to the project. Use the public routines therein.

VB source code to produce the above windows is to be found in the demo VB project.

Points of Interest

PGO mail was developed as a 'Homer' and completed in Feb 2003. It found a use with three programmers, at separated offices (two offices 250 miles apart), who were developing:

  • A VB.NET GUI.
  • An OPC server add-on data-source.
  • A 48 modem line driver to capture region-wide data for the OPC server.
  • With PGOs.exe running on an agreed node, the programs were co-operating within three weeks. The feedback to the implementation design was unusually early. Because the message i/face de-coupled the programs, the modifications/developments were also de-coupled.
  • When the suite was moved to the target node, the service was confined to this node by using the IP 'localhost'.

History

  • 3.4 Comment/Logging maintenance.
  • 3.2 Server-side 'select' timeout is reduced from 50 to 1 millisecond. This allows faster transfer, though one's machine will get busier.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United Kingdom United Kingdom
BSc (St.Andrews(1963-67))
MSCE
Systems Programmer 39+yrs
Married to first wife 35yrs & counting, four grown-up children
Religious opinions similar to MelG's
It is not the gnosis, but the praxis must be the fruit. (Aristotle)

Comments and Discussions

 
GeneralSome thoughts. Pin
solo10-May-04 22:11
solo10-May-04 22:11 
GeneralRe: Some thoughts. Pin
Lymington11-May-04 1:33
Lymington11-May-04 1:33 
GeneralRe: Some thoughts. Pin
solo11-May-04 18:44
solo11-May-04 18:44 
GeneralRe: Some thoughts. Pin
Lymington13-May-04 0:41
Lymington13-May-04 0:41 
The acronym that dare not speak its name....

Performance
On the codeproject site for SOC[& hence BOS[& hence PGO]] the time-out for the
server-side socket 'select' function is {0,050000} i.e. 50 milliseconds.

This limits the speed of a mailbox load to 50/sec. But with several disparate mailboxes in use the throughput has been seen (in the PGOserverN.logs) to exceed 450/sec. It is not particularly message size dependant. The processor usage on a 300KHz machine is less than 5%.

I intend to update SOC[&hence BOS[& hence PGO]] to use a server-side 'select' function timer of {0,001000}. This gives a throughput of up to 2000/sec for 256byte mss & 1000/sec for 1024byte mss. This compleatly loads my 300KHz machine.

Why
I was involved in writing an WNT VisBas ocx to couple, in as decoupled a way a possible, two packages from different suppliers. When all the negotiations were finished the upshot was communication by commands in little text files on one side because there was no elegant acceptable alternative. Gru.. Now there is an elegant alternatve, whether it is acceptable or not I must wait & see.

Regards
Lymington

GeneralMissing (at least) Pin
c2j23-May-04 23:24
c2j23-May-04 23:24 
GeneralRe: Missing (at least) Pin
Lymington8-May-04 5:58
Lymington8-May-04 5:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.