Original Author Paul Laughton, 2011
Page 125
De Re BASIC!
Socket.server.write.file <file_nexp>
Transmit a file to the Client. The <file_nexp> is the file index of a file opened for read by Byte.open.
Example:
Byte.open r, fr, "image.jpg"
Socket.server.write.file fr
Byte.close fr
Socket.server.read.file <file_nexp>
Read file data transmitted by the Client and write it to a file. The <file_nexp> is the file index of a file
opened for write by Byte.open. Example:
Byte.open w, fw, "image.jpg"
Socket.server.read.file fw
Byte.close fw
Socket.server.disconnect
Close the connection with the previously-connected Client. A new Socket.server.connect can then be
executed to connect to the next client in the queue.
Socket.server.close
Close the previously created Server. Any currently connected client will be disconnected.
Socket.server.client.ip <nvar>
Return the IP of the Client currently connected to the Server.
FTP Client
These FTP commands implement a FTP Client
Ftp.open <url_sexp>, <port_nexp>, <user_sexp>, <pw_sexp>
Connects to the specified url and port. Logs onto the server using the specified user name and
password. For example:
Ftp.close
Disconnects from the FTP server.
Ftp.put <source_sexp>, <destination_sexp>
Uploads specified source file to the specified destination file on connected ftp server.
The source file is relative to the directory, "<pref base drive>/rfo-basic/data/" If you want to upload a
BASIC! source file, the file name string would be: "../source/xxxx.bas".