@database "NewWait4Port" @$VER: NewWait4Port.guide 1.00 (08.08.99/14:40:51/@1999 Jean Holzammer) @Author Jean Holzammer @(C) ©1999 by Jean Holzammer @Node Main "NewWait4Port Documentation" @{"©" Link COPYRIGHT} 1999 by @{"Jean Holzammer" Link CONTACT} @{"Introduction" Link INTRODUCTION} What is it all about ? @{"Features " Link FEATURES} What's so special with NewWait4Port ? @{"Installation" Link INSTALLATION} How to make it work @{"Usage " Link USAGE} How to use it @{"Bugs " Link BUGS} No program is perfect @{"History " Link HISTORY} Have a look back @{"Contact " Link CONTACT} How you can get in contact with me @EndNode @Node INTRODUCTION @TITLE Introduction @{u}So what does it do ?@{uu} NewWait4Port is a replacement of the WaitForPort command provided with Amiga-OS. It waits for a Message Port to appear and then end itself. This is useful for batch scripts. Here's an example: run <>NIL: Miami:Miami ;start Miami TCP/IP-Stack as background task NewWait4Port MIAMI.1 ;wait for its Msg port to appear rx "ADDRESS MIAMI.1 ONLINE" ;send a rexx command to this port This script waits till Miami has been started and its ARexx Port is available. Then it tells Miami to go online. Without NewWait4Port you would try to send a rexx message before the Port is available as it needs some time for Miami to start. Of course you could use a simple @{i}wait 5@{ui}. But you never really know how long Miami will need to start. @EndNode @Node FEATURES @TITLE Features @{b}The original WaitForPort command@{ub} of Amiga-OS has two major disadvantages: ·it ends itself if the port isn't available within 10 seconds. ·it uses an endless loop of FindPort() calls resulting in a massive loss of CPU performance. @{b}NewWait4Port@{ub} waits for the Port to appear even if it has to wait for hours. It also allows you to define a delay time between FindPort() calls preventing a loss of CPU performance. @EndNode @Node INSTALLATION @TITLE Installation Nothing's as simple as that. Copy NewWait4Port to sys:rexxc/ Rename it to WaitForPort if you like. Copy the documentation to wherever you want. @EndNode @Node USAGE @TITLE Usage Usage: PORT/A,DELAYTICKS/N PORT/A is the name of the message port to wait for. This argument must be provided. If the name includes spaces you need to enclose it with "". Consider that Amiga-OS port names are case sensitive ! DELAYTICKS/N is the delay time between the single FindPort() calls. The value given must be the number of 1/50 seconds (=1 tick). Defaults to 0 (behaviour of the original WaitForPort command). 25 is probably a good value here. Example: NewWait4Port MIAMI.1 10 ; waits for MIAMI.1 port to appear. It checks its availability every 10/50 second (=200 milli seconds). If you start NewWait4Port without any arguments Amiga-DOS will show you the template and ask you for input. If you input a ? now you will get a more detailed explanation of the arguments. You can cancel NewWait4Port by sending a CTRL_C break. This can be done by pressing or by the following commandline: break `status COM=newwait4port` C Note that it can take up to DELAYTICKS time for the program to quit as the program cannot quit within a Delay() call. @EndNode @Node BUGS @TITLE Bugs No bugs known (so far...). Tell me if you find one. @EndNode @Node HISTORY @TITLE History 1.00 First Version, first Aminet Release @EndNode @Node COPYRIGHT @TITLE Copyright Notice ©1999 by Jean Holzammer This Programm is @{b}Freeware@{ub}. You may use it for free for private and commercial use. You may distribute it as long as you provide the full and unmodified archive. If you distribute it commercially you may not charge more than 1 EUR per disc or 5 EUR per CD-ROM. Otherwise you need my explicit permission. Permission is hereby granted to Aminet CD-ROMs and Aminet Set CD-ROMs. @EndNode @Node CONTACT @TITLE Contact information Do you want to report bugs, make suggestions or show me you like this product you can contact me at @{i}jholzammer@bene.baynet.de@{ui} snailmail: Jean Holzammer Ringstraße 20 92369 Sengenthal Germany fax: (0049 for Germany) 089/6661 713 498 http://Jean.Holzammer.home.pages.de You can also contact me if you are interested in the source of the programm. Thanks to: ·Wouter van Oortmerssen for his implementation of the E language. ·Dietmar Eilert for the best text editor available on any platform. ·Urban Müller and his team for the Aminet that initiated a boom of freely available software. ·Richard Körber for GuideML. ·everyone else supporting the idea of free software and open source technology. @EndNode