Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199801_2.adf » Regulars2 » StarInfo/Fletcher/!Setup/Files/Disc1/Program/NetGame/!NetGame/Help/SocketLib
StarInfo/Fletcher/!Setup/Files/Disc1/Program/NetGame/!NetGame/Help/SocketLib
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199801_2.adf » Regulars2 |
Filename: | StarInfo/Fletcher/!Setup/Files/Disc1/Program/NetGame/!NetGame/Help/SocketLib |
Read OK: | ✔ |
File size: | 42D0 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
HELP( � ����, ��� � $ DIR$� � � G���u��k� !Root � G������kv info ( G�����?r� PROC � G�����?r� FN DATA� SocketLib routines #Parent StrongHelp:!Menu Socket specific : #Indent 2 #Table Columns 3 <PROCinitsockets> <PROCclosesockets> <FNsocket_createinet> <PROCsocket_close> <PROCsocket_listen> <FNsocket_findlisten> <FNsocket_accept> <FNsocket_connect> <FNsocket_noblockconnect> <FNsocket_ready> <FNsocket_connected> <PROCsocket_makebuffered> <PROCsocket_makelinger> <PROCsocket_makereusable> <FNsocket_inbuffer> <FNsocket_eof> <FNsocket_readdata> <FNsocket_readline> <PROCsocket_senddata> <PROCsocket_sendline> <FNsocket_getpeername> #EndTable #Indent Non-socket specific : #Indent 2 #Table Columns 2 <FNinet_gethostbyname> <FNinet_gethostbyaddr> <FNinet_getservbyname> <FNinet_getservbyport> <FNinet_decodeerror> <FNinet_createservmenu> <FNinet_mtresolver> <FNinet_startmtgethostbyname> <FNinet_startmtgethostbyaddr> <FNinet_checkmtquery> <FNinet_mtgethostbyname> <FNinet_mtgethostbyaddr> <PROCinet_killmtquery> #EndTable #Indent Buffer handling : #Indent 2 #Table Columns 2 <FNbuffer_getword> <FNbuffer_getrest> #EndTable #Indent Logging (<SysLog=>SWI:SysLog_>) : #Indent 2 #Table Columns 3 <PROCsyslog> <FNlog_opensession> <PROClog_closesession> <PROClog_session> <PROClog_indent> <PROClog_outdent> <PROClog_data> #EndTable #Indent <Information=>info> on SocketLib DATAv SocketLib help #Align Centre {fh3}JFShared SocketLib v1.09{f} #Align Left The Socket Library is a Basic Library file which provides an interface to the <Internet=>Internet:!Root> Sockets SWI calls. In conjunction with the <WimpLib=>WimpLib:!Root> and JFShared skeleton application this provides a very simple way of creating applications which can talk to ports across the internet, or an intranet. This help file details the routines provided in SocketLib. The Socket Library is referenced by \<SocketLibrary$File> and should be loaded with : {fCode}LIBRARY "\<SocketLibrary$File>":PROCinitsockets{f} The JFShared application is � <Justin Fletcher=>Filetypes:Authors_JustinFletcher>, 1997 and is released into the Public Domain with the same restrictions as subsist in most PD software. This includes the fact that when distributed the entire application must remain intact. DIR$� � F������� initsockets � G���U�KT closesockets � G���-�?r socket_ � G����?r0 inet_ H G����Na� syslog � G���ƿ?r� log_ DATA� PROCinitsockets #Parent !Root Initialise the sockets library variables Call this routine at the start of any program that uses the SocketsLib file. DATA PROCclosesockets #Parent !Root Shutsdown the Sockets library. You must call this routine at the end of any program which uses the library. It will close all the sockets currently open and release any memory claimed, as well as removing all multitasking lookups. DIR$ � F����E�m close ( F������� listen � F���m��! makebuffered � F���N �� makelinger � F����B �Q makereusable @ F���DL�� senddata , F������ sendline DATAm PROCsocket_close(socket) #Parent !Root => {/}socket{/} handle of socket Closes a sockets connection. DATA� PROCsocket_listen(socket,ip,port) #Parent !Root => /socket/ handle of socket as given by <FNsocket_createinet> /ip/ address of host to accept connections from (usually 0) /port/ port number to listen on Listens for connections on a specific socket. An error will occur if the specified port is already bound to another socket. Use <FNsocket_findlisten> if you wish to be allocated a socket in a range. DATA! PROCsocket_makebuffered(socket) #Parent !Root => /socket/ handle of socket as given by <FNsocket_createinet> Allocates a buffer for the socket so that calls to <FNsocket_readline> can be used. Otherwise you'll have to just use <FNsocket_readdata> passing your own memory pointer. DATA� PROCsocket_makelinger(socket,time) #Parent !Root => /socket/ handle of socket as given by <FNsocket_createinet> /time/ time to linger for in seconds, or 0 to disable Ensures that the socket will remain valid so that data can be read on close. DATAQ PROCsocket_makereusable(socket,flag) #Parent !Root => /socket/ handle of socket as given by <FNsocket_createinet> /flag/ TRUE to allow the address to be re-used When you close a socket it usually waits for a time before allowing another socket to be created on the same port. By making the socket reusable this will not occur. DATA� PROCsocket_senddata(socket,block,length) #Parent !Root => /socket/ handle of socket as given by <FNsocket_createinet> /block/ pointer to the data to send /length/ length of data to send Sends a block of memory to a socket. DATA� PROCsocket_sendline(socket,line$) #Parent !Root => {/}socket{/} handle of socket as given by <FNsocket_createinet> {/}line${/} line to send Sends a line to a socket, LF (&10) terminated. DIR$0 0 $ G�����JT$ killmtquery DATA$ PROCinet_killmtquery(handle) #Parent !Root => {/}handle{/} handle returned by one of the FNinet_start... calls Destroys a multi-tasking lookup. Use this if you don't care anymore what the address is. This is performed automatically after reading the answer with FNinet_mtgethostby...DATA� PROCsyslog(level,text$) #Parent !Root => {/}level{/} <priority=>SWI:SysLog_priorities> {/}text${/} text to log Log a line to the main log for this application. DIR$� � � G���Qga� closesession 8 G�����a� session G�����a� indent � G���:�a� outdent h G���n6aK data DATA� PROClog_closesession(session) #Parent !Root => {/}session{/} session handle returned from <FNlog_opensession> Closes a session log. DATA� PROClog_session(session,level,text) #Parent !Root => {/}session{/} session handle returned from <FNlog_opensession> {/}level{/} <priority=>SWI:SysLog_priorities> {/}text${/} text to log Log a line to a session log. DATA� PROClog_indent(log) #Parent !Root => {/}log{/} session handle returned from <FNlog_opensession>, or -1 for default Indents subsequent output to the log file. DATA� PROClog_outdent(log) #Parent !Root => {/}log{/} session handle returned from <FNlog_opensession>, or -1 for default Removes one indent from the log file. DATAK PROClog_data(log,level,data,length,start) #Parent !Root => {/}log{/} session handle returned from <FNlog_opensession>, or -1 for default {/}level{/} <priority=>SWI:SysLog_priorities> {/}data{/} pointer to the data {/}length{/} length of data {/}start{/} offset of the start of the data when output Dumps a data block. DIR$� � @ G����?r� socket_ �- G���)�?rL buffer_ @4 G���t�?r� inet_ B G�����?r0 log_ DIR$� � � F������ connect F����� findlisten � F���\�) accept � F���Gb � inbuffer �! G������1 eof �"