home *** CD-ROM | disk | FTP | other *** search
- !
- ! Copyright (c) 1993
- ! by CompuServe Incorporated, Columbus, Ohio
- !
- ! The information in this software is subject to change without
- ! notice and should not be construed as a commitment by CompuServe.
- !
- ! InfoNet:
- ! Connect to InfoNet or InfoNet-Europe. Arg1 contains TRUE if
- ! connect is to InfoNet-Europe and FALSE otherwise.
- ! Success: returns %Success
- ! Failure: saves error msg in %FailureMsg and returns %Failure
- !
- !+V
- ! "3.3"
- !-V
-
- Europe = Arg1;
-
- if Europe goto Init_Europe;
- show "Connecting to InfoNet World-Connect";
- FailStr = "InfoNet World-Connect not responding";
- FailStr2 = "InfoNet World-Connect not connecting";
- goto Init_Common;
-
- Init_Europe:
- show "Connecting to InfoNet Euro-Connect";
- FailStr = "InfoNet Euro-Connect not responding";
- FailStr2 = "InfoNet Euro-Connect not connecting";
-
- Init_Common:
- Tries = 5;
- Timeout = 10;
- Got_Center = %FALSE;
- on cancel goto Return_Cancel;
-
- Wait_InfoNet:
- wait
- "#" goto Send_Response,
- "Center" goto Send_InfoNet_Host,
- "Centre" goto Send_InfoNet_Host,
- "COMMUNICATION" goto Return_Success
- until Timeout;
-
- Timeout = 50;
- if Tries = 0 goto InfoNet_Failure;
-
- Tries = Tries - 1;
- send %CR & %CR & %CR;
- goto Wait_InfoNet;
-
- Send_Response:
- if Got_Center goto Wait_InfoNet;
- send "C" & %CR;
- Timeout = 195;
- goto Wait_InfoNet;
-
- Send_InfoNet_Host:
- if Europe goto Send_InfoNet_Europe_Host;
- send "CPS" & %CR;
- goto Finish_Send_Host;
-
- Send_InfoNet_Europe_Host:
- send "CSF" & %CR;
- Finish_Send_Host:
- FailStr = FailStr2;
- if Tries = 0 goto InfoNet_Failure;
-
- Tries = Tries - 1;
- Got_Center = %TRUE;
- Timeout = 835;
- goto Wait_InfoNet;
-
- InfoNet_Failure:
- define %FailureMsg = FailStr;
- exit %Failure;
-
- Return_Cancel:
- exit %Cancel;
-
- Return_Success:
- exit %Success;
-