IFT Server Overview
(applied in the Zdemo1.app example)
Contributed by Phil S. Will
Edited by Mike Pasley


STEPS - GLOBAL EXTENSIONS
1. Add Global Template --IFT Prototypes.  Adds

Adds #PROJECT('wsock32.LIB')
Adds ASCII Driver
Adds DOS Driver
Adds IFTHTTPG.INC
Adds Global Data -- Global Data
Adds IFTHTTPD.INC -- Global Data Embed
Adds IFTHTTPM.INC -- Map

2. Throughput Defaults Tab

General Data buffer: 100,000  [0-500000]
Record Size: 4096 [0-20,000,000]
Buffer Size: 1025 [1-20,000,000]

3. Add InterLink Global Template (adds ShellExec)

STEPS – SERVER START AND STOP
1. Add (or use existing) Window Procedure
2. Add Server HTTP Procedures and Routines – Adds start procedures and routines.

  • Uncheck server parameters
  • Uncheck send test data
  • Check Add Network Parameters
  • Add Port 89
  • Backlog Queue 3
  • Check Generate Routines?
  • Uncheck Processing Message?
  • Use include file: IFTHTTP.INC – is added to procedure includes.
  • Uncheck File Upload
  • 3. Populate Start and Stop Buttons– This starts and stops the server.  Buttons are enabled or disabled according to whether server is started or not.
    4. Start Server Embed: Add
    PORT=GETINI('Settings','Port',PORT,'ZapWeb.ini')
    5. Start Server Routine Embed
    6. After Open Window (init)

    7. At Stop Server Accepted

    8. At Kill Method

    STEPS – LISTEN,ACCEPT,PROCESS
    1. Window Procedure – MDI Child
    2. Add IFT Server Procedures and Routines Extension

  • Uncheck Server Parameters
  • Uncheck Send Test Data
  • Uncheck Network Parameters
  • Uncheck Generate Routines
  • Check Processing Messages
  • Window Handle Name: WindowHandle
  • Event Handler Name: OldEventHandler
  • Window Label: AcceptWindow (or the window name)
  • Check Hide This Window
  • Check NameProcedure
  • Procedure Name: SocketEventsAccept
  • Include File Name: IFTAccept.INC
  • Target Window Handle: Winhandle2
  • Which As. Msgs to Process: Check ACCEPT
  • Uncheck use upload variable.
  • 3. Embeds:

    The HTTP Procedure and Routines Template has the following Routines

  • StartServer
  • StopServer
  • MyGetRoutine
  • MyPostRoutine
  • FixSpaces
  • FixZeroes
  • FixDashes
  • The HTTP Procedure and Routines Template has the following Procedures

    STEPS – PROCESS WINDOW CODE
    1. Add PowerMerge Search and Replace Extension

  • Check Archive Tokens
  • Logical Token File: TokenFile
  • Physical token File: MrgTksn.txt
  • 2. Add Inline List PowerMerge Extension
  • Start of List Token: **Fname**
  • End of List Token **BR**
  • Logical Token File: ILTokenFile ** I CAN’T FIND REFERENCE TO THIS FILE.
  • Physical Token File: Nlsttkns.txt
  • Source Information Include File: ILMrgTpl.INC
  • Check Use file
  • File: Contacts
  • Data Associates: enter
  • 3. Add HTTP Server Procedures and Routines Extension
  • Check server parameters
  • Default IP Address: 127.0.0.1
  • Drive: C **SAME
  • Path: \CLARION5\IFTEXAMPLES\ **SAME
  • Check Send Test Data
  • URL For Test Data: mytest
  • Test Message: Test Successful
  • Uncheck Network Parameters
  • Check Processing Messages
  • Window Handle Name: Winhandle2
  • Event Hanler Name: OldEventHandler2
  • Window Label: ProcessWindow
  • Check Hide this Window
  • Check Name Procedure
  • Procedure Name: SocketEventsProcess
  • Include File: IFTProc.INC
  • Window Handle Name: Winhandle
  • Asynchronous Messages to Process: Check READ, WRITE, CLOSE
  • Check Use Upload Variables
  • Storage File: Upload
  • Name Variable: Upload:Name
  • Value Variable: Upload:NameValue
  • FileName Variable: Upload:FileName
  • Upload Action: UPLOADFLAG
  • Check: Action is Variable
  • Upload Limit: 50000(default)
  • Upload Drive: C
  • Upload Path: \CLARION5\IFTEXAMPLES\UPLOAD

  • 4. Enter Embeds:

    Site design by InterArtica
    Copyright 1998,1999