************************************************************************ * INCSPEC.TXT - this file contains the command syntaxs of the include * file's commands ************************************************************************ Please note that this file automatically includes the library NetWorld. It also defines all variables as INTegers and includes TRANSPRT.BH. A global variable called STIKINITIALISED contains the status of STiK - 1 if everything is OK, or a negitive error code number (which has nothing to do with the built in error codes!). FUNCTION gerrtxt$ (er%) Returns the STiK error ER as a string. FUNCTION gvstr$ (er$) Returns a STiK internal configuration as a string. For example, if you want to get the users email address: email$=gvstr$("EMAIL") For me, email$ now contains "paulat.jones@zetnet.co.uk". FUNCTION tcp_author$ Returns as a string the author's name of the TCP transport layer. Currently this is Dan Ackerman. FUNCTION tcp_version$ Returns as a string the version number of the TCP transport layer. FUNCTION tcp_module$ Returns information, as a string, about the TCP transport layer module. FUNCTION networldver$ Returns as a string the NetWorld version number. FUNCTION TCP_connect% (domain$, port, tos, alloc) Connects to a domain named DOMAIN$ on port PORT with the Type of Service as TOS and amount of memory to allocate as ALLOC. This uses both resolve and TCP_open. Returns the handle number if positive, or -1 if an error occured. FUNCTION get_response$ (cn, time) Gets a string from the server. This is useful after sending a line with TCPsend below. CN is the channel, and TIME is the amount in time (in seconds) to wait for, before a time out error is sent back. Returned is the string from the server OR the text version of an error message! NOTE: I couldn't get this command to run correctly on HBASIC v1, so I've left it out. If anyone can figure out why, please let me know. FUNCTION TCPsend (cn, message$) Please don't confuse this with TCP_send. This sends the message MESSAGE$ to channel CN. This is useful with get_response$ above. This command automatically adds chr$(13) and chr$(10) to it, calculates the length and sends it. SUB initnetworld Sets up NetWorld. If STiK is not installed correctly, stikinitialised will be a negitive error. NOTE: the include file will automatically call this sub routine for you.