home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / ad109u17.zip / adeptrexxcomfuncs.doc < prev    next >
Text File  |  1997-02-20  |  23KB  |  809 lines

  1.  
  2.                            AdeptXBBS REXX INTERFACE
  3.                            Comm & Raw Comm Routines
  4.  
  5.                     Copyright (c) 1993 - 1996 by AdeptSoft
  6.                   portions Copyright (c)  1991-1994 M. Kimes
  7.                              All Rights Reserved
  8.  
  9.                       AdeptSoft, AdeptXBBS, GateKeeper,
  10.                         are trademarks of AdeptSoft.
  11.  
  12.       "XBBS"  Copyright (c) 1988 - 1994 by M. Kimes. The "XBBS" name is a
  13.                            Trademark of M. Kimes.
  14.                                        
  15.  
  16.  
  17. FUNCTION LISTING
  18. ---------------------------------------------------------------------------
  19. AdeptComDial()
  20.  
  21.      FUNCTION USAGE
  22.        call AdeptComDial LineNumber, "STRING TO DIAL"
  23.  
  24.      ARGUMENTS
  25.        LineNumber: 
  26.        Node Number passed to REXX routine from Adept as first parameter. 
  27.  
  28.        String to Dial:
  29.        A string enclosed in quotes that you want to be sent to the modem.
  30.  
  31.      RETURNED VALUE
  32.  
  33.      DESCRIPTION
  34.        AdeptComDial will parse a string to the modem through the dialing
  35.        translation.  I.E. "v~^ATDT555-1212|" will be translated to
  36.        LOWER DTR, PAUSE FOR A SECOND, RAISE DTR, SEND 'ATDT555-1212' then
  37.        a CR (Carriage Return to the modem).
  38.  
  39.      NOTES
  40.        Dialing Translation Table:
  41.         'v'  - Lower DTR
  42.         '^'  - Raise DTR
  43.         '~'  - Pause for one Second
  44.         '`'  - Pause for 1/10th of a second
  45.         '|'  - Carriage Return
  46.         '\\' - Escape Character
  47.         
  48.      EXAMPLE
  49.        The following EXAMPLE will dial the number 555-1212:
  50.  
  51.        Call AdeptComDial LineNumber,"v~^~ATDT555-1212|"
  52.   
  53.      RELATED FUNCTIONS
  54.        AdeptComWaitConnect()
  55.  
  56. ---------------------------------------------------------------------------
  57. AdeptComDoDTR()
  58.  
  59.      FUNCTION USAGE
  60.        call AdeptComDoDTR LineNumber, `0' or `1'
  61.  
  62.      ARGUMENTS 
  63.        LineNumber: 
  64.        Node Number passed to REXX routine from Adept as first parameter. 
  65.  
  66.        Type:
  67.        0 - Drop DTR (Will leave it dropped)
  68.        1 - Raise DTR (Will Leave it raised)
  69.  
  70.      RETURNED VALUE
  71.  
  72.      DESCRIPTION
  73.        The AdeptComDoDTR function will raise or drop DTR to the node 
  74.        specified with the LineNumber parameter.
  75.  
  76.      NOTES
  77.  
  78.      EXAMPLE
  79.        This Example will drop the DTR:
  80.  
  81.        call AdeptComDoDTR LineNumber,'0'
  82.  
  83.      RELATED FUNCTIONS
  84.  
  85. ---------------------------------------------------------------------------
  86. AdeptComFlush()
  87.  
  88.      FUNCTION USAGE
  89.        call AdeptComFlush LineNumber
  90.        
  91.      ARGUMENTS
  92.        LineNumber: 
  93.        Node Number passed to REXX routine from Adept as first parameter. 
  94.  
  95.      RETURNED VALUE
  96.  
  97.      DESCRIPTION
  98.        AdeptComFlush will flush the output stream of the current com 
  99.        port.
  100.  
  101.      NOTES
  102.        ** BE CAREFUL **
  103.        This is a RAW com function.  This is only to be used by
  104.        professionals or people experienced with programming serial based
  105.        products.
  106.  
  107.      EXAMPLE
  108.        This example will flush the contents of the line's output stream:
  109.  
  110.        call AdeptComFlush LineNumber
  111.  
  112.      RELATED FUNCTIONS
  113.  
  114. ---------------------------------------------------------------------------
  115. AdeptComGetBlock()
  116.  
  117.      FUNCTION USAGE
  118.        call AdeptComGetBlock LineNumber, Length, Time, Stem
  119.        or
  120.        value = AdeptComGetBlock(LineNumber, Length, Time, Stem)
  121.  
  122.      ARGUMENTS
  123.        LineNumber: 
  124.        Node Number passed to REXX routine from Adept as first parameter. 
  125.        
  126.        Length:
  127.        Length of block to receive.
  128.        
  129.        Time:
  130.        Timeout period. In milliseconds.
  131.        
  132.        Stem:
  133.        Received block is stored in this variable.
  134.  
  135.      RETURNED VALUE
  136.        -1      Carrier Drop
  137.         0      Timeout
  138.         
  139.      DESCRIPTION
  140.        AdeptComGetBlock will read the input queue until the timeout period
  141.        expires or 'Length' characters are received, whichever comes first.
  142.        
  143.      NOTES
  144.        ** BE CAREFUL **
  145.        This is a RAW com function.  This is only to be used by   
  146.        professionals or people experienced with programming serial based
  147.        products.
  148.  
  149.      EXAMPLE
  150.        This example will get a block of 12 characters with a timeout period
  151.        of 5 seconds and store it in the variable String:
  152.        
  153.        call AdeptComGetBlock line, 12, 5000, 'String'
  154.  
  155.      RELATED FUNCTIONS
  156.        AdeptComGetByte()
  157.        AdeptComGetString()
  158.  
  159. ---------------------------------------------------------------------------
  160. AdeptComGetByte()
  161.  
  162.      FUNCTION USAGE
  163.        value = AdeptComGetByte(LineNumber, Time)
  164.  
  165.      ARGUMENTS
  166.        LineNumber: 
  167.        Node Number passed to REXX routine from Adept as first parameter. 
  168.      
  169.        Time:
  170.        Timeout period. In milliseconds.
  171.      
  172.      RETURNED VALUE
  173.        -1      Carrier Drop
  174.         0      Timeout
  175.        If the function does not time out or notice a carrier drop, it will
  176.        return the byte received.
  177.        
  178.      DESCRIPTION
  179.        AdeptComGetByte receives a byte from the input stream.
  180.  
  181.      NOTES
  182.        ** BE CAREFUL **
  183.        This is a RAW com function.  This is only to be used by   
  184.        professionals or people experienced with programming serial based
  185.        products.
  186.  
  187.      EXAMPLE
  188.        The following example get a byte from the current lines' input 
  189.        stream and stores it in the variable char:
  190.  
  191.        char = AdeptComGetByte(line, 1000)
  192.  
  193.      RELATED FUNCTIONS
  194.        AdeptComGetBlock()
  195.        AdeptComGetString()
  196.  
  197. ---------------------------------------------------------------------------
  198. AdeptComGetString()
  199.  
  200.      FUNCTION USAGE
  201.        call AdeptComGetString LineNumber, Length, Time, Chr, Ignore, Stem
  202.        or
  203.        value = AdeptComGetString(LineNumber, Length, Time, Chr, Ignore, Stem)
  204.  
  205.      ARGUMENTS
  206.        LineNumber: 
  207.        Node Number passed to REXX routine from Adept as first parameter. 
  208.      
  209.        Length:
  210.        Length of string to receive.
  211.  
  212.        Time:
  213.        Timeout period.  In milliseconds.
  214.        
  215.        Chr:
  216.        Ignored but required.
  217.        
  218.        Ignore:
  219.        Ignored but required.
  220.        
  221.        Stem:
  222.        Variable to place received string in.
  223.  
  224.      RETURNED VALUE
  225.        -1      Carrier Drop
  226.         0      Timeout
  227.  
  228.      DESCRIPTION
  229.        AdeptComGetString will read the input queue until 'time' expires or
  230.        length characters are received, whichever comes first.
  231.        This function is identical to AdeptComGetBlock apart from the syntax.
  232.  
  233.      NOTES
  234.        ** BE CAREFUL **
  235.        This is a RAW com function.  This is only to be used by   
  236.        professionals or people experienced with programming serial based
  237.        products.
  238.  
  239.      EXAMPLE
  240.        This example will get a block of 12 characters with a timeout period
  241.        of 5 seconds and store it in the variable String:
  242.        
  243.        call AdeptComGetString line, 12, 5000, 'Chr', 'Ignore', 'String'
  244.  
  245.      RELATED FUNCTIONS
  246.        AdeptComGetBlock()
  247.        AdeptComGetByte()
  248.  
  249. ---------------------------------------------------------------------------
  250. AdeptComPeekByte()
  251.  
  252.      FUNCTION USAGE
  253.        value = AdeptComPeekByte(LineNumber, Time)
  254.  
  255.      ARGUMENTS
  256.        LineNumber: 
  257.        Node Number passed to REXX routine from Adept as first parameter. 
  258.  
  259.        Time:
  260.        The timeout period is in the format of milliseconds.
  261.  
  262.      RETURNED VALUE
  263.         -1      Carrier Drop
  264.          0      Timeout
  265.        If the function does not time out or notice a carrier drop, it will
  266.        return the next byte in the input queue.
  267.  
  268.      DESCRIPTION
  269.        Returns the next character on the input stream but does not remove
  270.        it from the stream.
  271.  
  272.      NOTES
  273.        ** BE CAREFUL **
  274.        This is a RAW com function.  This is only to be used by   
  275.        professionals or people experienced with programming serial based
  276.        products.
  277.  
  278.      EXAMPLE
  279.        The following will wait 5 seconds for the next character on the
  280.        input queue.  It will return this character into the variable char
  281.        but leave the character in the input queue.
  282.        
  283.        char = AdeptComPeekByte(line, 5000)
  284.  
  285.      RELATED FUNCTIONS
  286.        AdeptComGetByte()
  287.  
  288. ---------------------------------------------------------------------------
  289. AdeptComPutC()
  290.  
  291.      FUNCTION USAGE
  292.        call AdeptComPutC LineNumber, Char
  293.        or
  294.        Value = AdeptComPutC(LineNumber, Char)
  295.          
  296.      ARGUMENTS
  297.        LineNumber:
  298.        Node number passed to REXX routine from Adept as first parameter.
  299.  
  300.        Char:
  301.        Character to put into the com output stream.
  302.  
  303.      RETURNED VALUE
  304.        -1      Carrier Drop
  305.  
  306.      DESCRIPTION
  307.        AdeptComPutC will put a character into the Com port output stream.
  308.  
  309.      NOTES
  310.        ** BE CAREFUL **
  311.        This is a RAW com function.  This is only to be used by   
  312.        professionals or people experienced with programming serial based
  313.        products.
  314.  
  315.      EXAMPLE
  316.        This would put the letter 'A' in the Com Port's output stream.
  317.  
  318.        call AdeptComPutC LineNumber,'A'
  319.  
  320.      RELATED FUNCTIONS
  321.  
  322. ---------------------------------------------------------------------------
  323. AdeptComWaitConnect()
  324.  
  325.      FUNCTION USAGE
  326.        call AdeptComWaitConnect LineNumber, Time
  327.        or
  328.        Value = AdeptComWaitConnect(LineNumber, Time)
  329.  
  330.      ARGUMENTS
  331.        LineNumber:
  332.        Node number passed to REXX routine from Adept as first parameter.
  333.  
  334.        Time:
  335.        The time is in the format of milliseconds.
  336.  
  337.      RETURNED VALUE
  338.        -1      Carrier Drop
  339.         0      Time out.
  340.        If it doesn't timeout it will then return the return code from the 
  341.        modem i.e. 'CONNECT 28800' 'ERROR', 'OK', 'NO CARRIER'.
  342.  
  343.      DESCRIPTION
  344.        AdeptComWaitConnect will wait for a modem connect, error code, 
  345.        timeout or carrier drop.
  346.  
  347.      NOTES
  348.  
  349.      EXAMPLE
  350.        The following example will dial the number 555-1212 and wait then
  351.        display the response:
  352.  
  353.        Call AdeptComDial LineNumber, "v~^~ATDT555-1212|"
  354.        connectresponse = AdeptComWaitConnect(LineNumber, 10000)
  355.        if(connectresponse>0) then
  356.          Call AdeptPrint LineNumber, "Connect Result: "||connectresponse
  357.  
  358.      RELATED FUNCTIONS
  359.        AdeptComDial()
  360.  
  361. ---------------------------------------------------------------------------
  362. AdeptComWrite()
  363.  
  364.      FUNCTION USAGE
  365.        call AdeptComWrite LineNumber, "string"
  366.        or
  367.        Value = AdeptComWrite(LineNumber, "string")
  368.  
  369.      ARGUMENTS
  370.        LineNumber: 
  371.        Node Number passed to REXX routine from Adept as first parameter. 
  372.        
  373.        String:
  374.        A string enclosed in quotes.
  375.  
  376.      RETURNED VALUE
  377.        -1      Carrier Drop
  378.  
  379.      DESCRIPTION
  380.        AdeptComWrite will place a string into the com port's output 
  381.        stream.
  382.  
  383.      NOTES
  384.        ** BE CAREFUL **
  385.        This is a RAW com function.  This is only to be used by   
  386.        professionals or people experienced with programming serial based
  387.        products.
  388.  
  389.      EXAMPLE
  390.        The following EXAMPLE would be used to Display "Hello!" to the output 
  391.        stream, if the carrier is dropped, it would signal NoCarrier and the 
  392.        script would be terminated.
  393.  
  394.        rc = AdeptComWrite(LineNumber,"Hello!")
  395.        if (rc = '-1') then 
  396.          signal NoCarrier
  397.  
  398.        NoCarrier:
  399.          exit
  400.  
  401.      RELATED FUNCTIONS
  402.  
  403. ---------------------------------------------------------------------------
  404. AdeptRawComClose()
  405.  
  406.      FUNCTION USAGE
  407.        call AdeptRawComClose ComInfo
  408.        or
  409.        value = AdeptRawComClose(ComInfo)
  410.  
  411.      ARGUMENTS
  412.        ComInfo:
  413.        ComInfo handle created by AdeptRawComOpen.
  414.  
  415.      RETURNED VALUE
  416.  
  417.      DESCRIPTION
  418.        Closes an Open Com Port Handle.
  419.  
  420.      NOTES
  421.        ** BE CAREFUL **
  422.        This is a RAW com function.  This is only to be used by   
  423.        professionals or people experienced with programming serial based
  424.        products.
  425.  
  426.      EXAMPLE
  427.        call AdeptRawComClose ComInfo
  428.  
  429.      RELATED FUNCTIONS
  430.        AdeptRawComOpen()
  431.  
  432. ---------------------------------------------------------------------------
  433. AdeptRawComGetBlock()
  434.  
  435.      FUNCTION USAGE
  436.        call AdeptRawComGetBlock ComInfo, Buffer, Length, Time(ms), CDetect, 
  437.                                 Bytename
  438.        or
  439.        Value = AdeptRawComGetBlock(ComInfo, Buffer, Length, Time(ms), 
  440.                                    CDetect, Bytename)
  441.  
  442.      ARGUMENTS
  443.        ComInfo:
  444.        ComInfo handle created by AdeptRawComOpen.
  445.        
  446.        Buffer:
  447.        Data received is stored in this variable.
  448.  
  449.        Length:
  450.        Number of characters to receive.
  451.        
  452.        Time:
  453.        Timeout period. In milliseconds.
  454.        
  455.        CDetect:
  456.        Carrier detect.  TRUE or FALSE.
  457.  
  458.        Bytename:
  459.        Number Of bytes read is stored in this variable.
  460.  
  461.      RETURNED VALUE
  462.         0      No Error
  463.         65592  Time Out.
  464.         65588  Connection/Carrier lost
  465.  
  466.      DESCRIPTION
  467.        Gets a block from the input stream.  Stopping at Length or Time.
  468.  
  469.      NOTES
  470.        ** BE CAREFUL **
  471.        This is a RAW com function.  This is only to be used by   
  472.        professionals or people experienced with programming serial based
  473.        products.
  474.  
  475.      EXAMPLE
  476.        The following example reads 12 characters into the variable buffer.
  477.        The timeout period is 5 seconds.
  478.        
  479.  
  480.        rc = AdeptRawComGetBlock(ComInfoHandle, 'buffer', 12, 5000, TRUE, 
  481.                                 'len')
  482.        if (rc=65588) then
  483.          signal NoCarrier
  484.          
  485.        NoCarrier:
  486.          exit
  487.        
  488.  
  489.      RELATED FUNCTIONS
  490.        AdeptRawComOpen()
  491.        AdeptRawComGetString()
  492.  
  493. ---------------------------------------------------------------------------
  494. AdeptRawComGetString()
  495.  
  496.      FUNCTION USAGE
  497.        call AdeptRawComGetString ComInfo, Buffer, Length, Term, Time, CDBuf
  498.        or
  499.        value = AdeptRawComGetString(ComInfo, Buffer, Length, Term, Time, 
  500.                                     CDBuf)
  501.  
  502.      ARGUMENTS
  503.        ComInfo:
  504.        ComInfo handle created by AdeptRawComOpen.
  505.      
  506.        Buffer:
  507.        String received is stored in this variable.
  508.        
  509.        Length:
  510.        Length of string to receive.
  511.  
  512.        Term:
  513.        Character to terminate input at.
  514.        
  515.        Time:
  516.        Timeout period.  In milliseconds.
  517.  
  518.        CDBuf:
  519.        Carrier Detect.  TRUE or FALSE.
  520.    
  521.      RETURNED VALUE
  522.         0      No Error
  523.         65592  Time Out.
  524.         65588  Connection/Carrier lost
  525.  
  526.      DESCRIPTION
  527.        AdeptRawComGetString Gets a string from the ComInfo handle.  Stopping
  528.        at Length characters or Time milliseconds, or if it finds Term 
  529.        character.  For example if the user enters "Hello" followed by enter
  530.        and the Term character was set to '\r' then AdeptRawComGetString would
  531.        return the string even if the timeout period had not expired or the
  532.        number of characters received was less than Length.
  533.  
  534.      NOTES
  535.        ** BE CAREFUL **
  536.        This is a RAW com function.  This is only to be used by   
  537.        professionals or people experienced with programming serial based
  538.        products.
  539.  
  540.      EXAMPLE
  541.        This example will attempt to receive 12 characters with a timeout 
  542.        period of 5 seconds from the port stored in ComInfoHandle.  It will
  543.        return the string before the timeout period or 12 characters are
  544.        received if the user presses enter.  If the function times out or 
  545.        detects a carrier drop, it will exit the script.
  546.        
  547.        rc = AdeptRawComGetString(ComInfoHandle,'buffer',12,'\r',5000,TRUE)
  548.        if (rc=65588) then
  549.          signal NoCarrier
  550.          
  551.        NoCarrier:
  552.          exit
  553.        
  554.      RELATED FUNCTIONS
  555.        AdeptRawComOpen()
  556.        AdeptRawComGetBlock()
  557.  
  558. ---------------------------------------------------------------------------
  559. AdeptRawComLink()
  560.  
  561.      FUNCTION USAGE
  562.        call AdeptRawComLink LineNumber, ToComInfo
  563.        or
  564.        Value = AdeptRawComLink(LineNumber, ToComInfo)
  565.  
  566.      ARGUMENTS
  567.        LineNumber:
  568.        Node number passed to REXX routine from Adept as first parameter.
  569.        
  570.        ToComInfo:
  571.        ComInfo handle to link the current line to.
  572.  
  573.      RETURNED VALUE
  574.         0      No Error
  575.         65592  Time Out.
  576.         65588  Connection/Carrier lost
  577.  
  578.      DESCRIPTION
  579.        This function links an open ComInfo handle to the current line.
  580.  
  581.      NOTES
  582.        ** BE CAREFUL**
  583.        This is a RAW com function.  This is only to be used by
  584.        professionals or people experienced with programming serial based
  585.        products.
  586.  
  587.      EXAMPLE
  588.        This example will open a telnet connection to Address on port Port.
  589.        It will then link this connection to the current line.
  590.  
  591.        rc = AdeptRawOpenSocket(ISTELNETCLIENT, Address, Port, 'Port')
  592.        if (rc=65588) then
  593.          signal NoCarrier
  594.  
  595.        rc = AdeptRawComLink(line, Port)
  596.        if (rc=65588) then
  597.          signal NoCarrier
  598.          
  599.        NoCarrier:
  600.          exit
  601.  
  602.      RELATED FUNCTIONS
  603.  
  604. ---------------------------------------------------------------------------
  605. AdeptRawComOpen()
  606.  
  607.      FUNCTION USAGE
  608.        call AdeptRawComOpen Port, Baud, Chr, Parity, Stopbit, Flags, Stem
  609.        or
  610.        Value = AdeptRawComOpen(Port, Baud, Chr, Parity, Stopbit, Flags, Stem)
  611.  
  612.      ARGUMENTS
  613.        Port:
  614.        Port to Open.
  615.        
  616.        Baud:
  617.        Baudrate to open Port at.
  618.        
  619.        Chr:
  620.        Data bits to set port at. ie 7,8 etc.
  621.        
  622.        Parity:
  623.        Parity to set port at.
  624.        
  625.        StopBit:
  626.        Stopbit to set port at.
  627.        
  628.        Flags:
  629.        LEAVEPORTOPEN    (0x00000001)
  630.        OPENPORTSHARED   (0x00000002)
  631.        OPENWRITETHROUGH (0x00000004)
  632.        IGNORECARRIER    (0x00000040)
  633.        ISSERIAL         (0x00000200) 
  634.        
  635.        Stem:
  636.        ComInfo Descriptor
  637.  
  638.      RETURNED VALUE
  639.         0      No Error
  640.         65592  Time Out.
  641.         65588  Connection/Carrier lost
  642.  
  643.      DESCRIPTION
  644.        Opens a ComInfo Handle used by the AdeptRaw set of functions.
  645.  
  646.      NOTES
  647.        ** BE CAREFUL**
  648.        This is a RAW com function.  This is only to be used by
  649.        professionals or people experienced with programming serial based
  650.        products.
  651.  
  652.      EXAMPLE
  653.        This Example will create ComInfoHandle, a handle to a ComInfo 
  654.        structure to be used in the various AdeptRawCom functions.
  655.        
  656.        Call AdeptRawComOpen 'COM4',9600,8,N,1,,'ComInfoHandle'
  657.  
  658.      RELATED FUNCTIONS
  659.        AdeptRawComClose()
  660.        AdeptRawOpenSocket()
  661.  
  662. ---------------------------------------------------------------------------
  663. AdeptRawComWrite()
  664.  
  665.      FUNCTION USAGE
  666.        call AdeptRawComWrite ComInfo, Buffer, Length, CDetect
  667.        or
  668.        value = AdeptRawComWrite(ComInfo, Buffer, Length, CDetect)
  669.  
  670.      ARGUMENTS
  671.        ComInfo:
  672.        ComInfo handle created by AdeptRawComOpen.
  673.        
  674.        Buffer:
  675.        Buffer to write into com output stream.
  676.        
  677.        Length:
  678.        Length of buffer to output.
  679.        
  680.        CDetect:
  681.        Carrier Detect? TRUE or FALSE
  682.      
  683.      RETURNED VALUE
  684.         0      No Error
  685.         65592  Time Out.
  686.         65588  Connection/Carrier lost
  687.  
  688.      DESCRIPTION
  689.        Writes Buffer up to Length characters to the ComInfo output stream.
  690.  
  691.      NOTES
  692.        ** BE CAREFUL **
  693.        This is a RAW com function.  This is only to be used by   
  694.        professionals or people experienced with programming serial based
  695.        products.
  696.  
  697.      EXAMPLE
  698.        The following example will send the contents of Buffer to the output 
  699.        stream, if the carrier is dropped, it would signal NoCarrier and the 
  700.        script would be terminated.
  701.  
  702.        rc = AdeptRawComWrite(ComInfoHandle, Buffer, LENGTH(Buffer), TRUE)
  703.        if (rc = 65588) then 
  704.          signal NoCarrier
  705.  
  706.        NoCarrier:
  707.          exit
  708.  
  709.      RELATED FUNCTIONS
  710.  
  711. ---------------------------------------------------------------------------
  712. AdeptRawOpenSocket()
  713.  
  714.      FUNCTION USAGE
  715.        call AdeptRawOpenSocket Flags, Hostname, Port, Stem
  716.        or
  717.        ComInfo = AdeptRawOpenSocket(Flags, Hostname, Port, Stem)
  718.  
  719.      ARGUMENTS
  720.        Flags: 
  721.        ISTELNETCLIENT (0x00000100)
  722.        ISSOCKETCLIENT (0x00000800)
  723.          
  724.        Hostname:
  725.        Host to connect to.
  726.          
  727.        Port:
  728.        Port to connect to.
  729.          
  730.        Stem:
  731.        ComInfo Descriptor.
  732.  
  733.      RETURNED VALUE
  734.         0      No Error
  735.         65592  Time Out/Error Connecting
  736.         65588  Connection/Carrier lost
  737.  
  738.      DESCRIPTION
  739.        Opens a socket connection to hostname and port.  Places the ComInfo
  740.        handle in Stem.
  741.  
  742.      NOTES
  743.        ** BE CAREFUL **
  744.        This is a RAW com function.  This is only to be used by   
  745.        professionals or people experienced with programming serial based
  746.        products.
  747.  
  748.      EXAMPLE
  749.        The following example opens a telnet link to Address:Port then links
  750.        the port to the user.
  751.  
  752.        rc = AdeptRawOpenSocket(ISTELNETCLIENT, Address, Port, 'Port')
  753.        if (rc=65588) then
  754.          signal NoCarrier
  755.  
  756.        rc = AdeptRawComLink(line, Port)
  757.        if (rc=65588) then
  758.          signal NoCarrier
  759.          
  760.        NoCarrier:
  761.          exit
  762.  
  763.      RELATED FUNCTIONS
  764.  
  765. ---------------------------------------------------------------------------
  766. AdeptRawSetBPS()           * Note this won't work for AdeptXBBS v1.07f/g4&5
  767.  
  768.      FUNCTION USAGE
  769.        call AdeptRawSetBPS ComInfo, Baudrate
  770.        or
  771.        Value = AdeptRawSetBPS(ComInfo, Baudrate)
  772.  
  773.      ARGUMENTS
  774.        ComInfo:
  775.        ComInfo handle created by AdeptRawComOpen.
  776.  
  777.        Baudrate:
  778.        Baudrate to set the port at.
  779.  
  780.      RETURNED VALUE
  781.         0      No Error
  782.         65592  Time Out.
  783.         65588  Connection/Carrier lost
  784.  
  785.      DESCRIPTION
  786.        Sets an open ComInfo handle to baudrate.
  787.  
  788.      NOTES
  789.        ** BE CAREFUL**
  790.        This is a RAW com function.  This is only to be used by
  791.        professionals or people experienced with programming serial based
  792.        products.
  793.  
  794.      EXAMPLE
  795.        This example will set the baudrate of ComInfoHandle to 14400 baud:
  796.        
  797.        rc = AdeptRawSetBPS(ComInfoHandle, '14400')
  798.        if (rc=65588) then
  799.          signal NoCarrier
  800.          
  801.        NoCarrier:
  802.          exit
  803.  
  804.      RELATED FUNCTIONS
  805.  
  806. ---------------------------------------------------------------------------
  807. ***  End Of AdeptXBBS AdeptRexx Com and RawCom Function Documentation.  ***
  808. ---------------------------------------------------------------------------
  809.