Skip to main content

tsNet

Type

library

Description

tsNet is a LiveCode external that replaces and enhances the networking capabilities of the platform.

© 2016 Tech Strategies

Exclusively licensed worldwide to LiveCode Ltd

Associated Syntax

Command

NameSummarySyntax
tsNetInitInitialises the tsNet external. This must be done prior to calling any other functions within the tsNet library.tsNetInit
tsNetCloseCloses all open connections and disables the tsNet external.tsNetClose
tsNetCABundleSets a CA bundle to be used for SSL connections within the tsNet external.tsNetCABundle <pCAFile>
tsNetLibUrlReuseConnectionEnable or disable connection re-use when using tsNet with libUrl.tsNetLibUrlReuseConnection <pEnable>
tsNetVerifySSLPeerEnable or disable SSL peer certificate verification.tsNetVerifySSLPeer <pEnable>
tsNetSSLNoRevokeEnable or disable SSL certificate revocation checks.tsNetSSLNoRevoke <pEnable>
tsNetSuppressConnectHeadersPrevent proxy CONNECT responses from being included in the returned HTTP headers tsNetSuppressConnectHeaders <pEnable>
tsNetRedirEnableEnable or disable automatic following of HTTP redirects.tsNetRedirEnable <pEnable>
tsNetCreateMissingDirsEnable or disable automatic creation of missing directories when uploading files via FTP or SFTP.tsNetCreateMissingDirs <pEnable>
tsNetSetFTPPortEnable or disable the use of active transfers for FTP.tsNetSetFTPPort <pPort>
tsNetSetDirNLSTEnable or disable "simple" directory listings over FTP and SFTP.tsNetSetDirNLST <pEnable>
tsNetSetTimeoutsAdjust the timeout values used by tsNet external.tsNetSetTimeouts <pDnsCacheTimeout>, <pRequestTimeoutMS>, <pConnectTimeoutMS>, <pAcceptTimeoutMS>, <pLowSpeedTime>, <pLowSpeedLimit>
tsNetSetProxyEnable or disable the use of a proxy for networking transfers.tsNetSetProxy <pProxyURL>, <pNoProxy>, <pUsername>, <pPassword>
tsNetSetStatusCallbackSends a message to the given callback when status updates are available for network transfers.tsNetSetStatusCallback <pCallback>
tsNetSetDebugCallbackSends a message to the given callback with verbose debug information during network transfers.tsNetSetDebugCallback <pCallback>
tsNetCloseConnRemoves the specified connection from memory.tsNetCloseConn <pConnectionID>

Function

NameSummarySyntax
tsNetGenerateKeyGenerates an RSA public/private key for use with SFTP transfers.tsNetGenerateKey(<pKeyLength>, <rPrivateKey>, <rPublicKey>, <pPassphrase>, [<pFormat])
tsNetVersionReturns the version of the tsNet external.tsNetVersion()
tsNetIsSyncBlockedReturns whether another synchronous call can be made immediately.tsNetIsSyncBlocked()
tsNetGetTimeoutsReturns the current timeout values used by tsNet external.tsNetGetTimeouts()
tsNetGetStatusReturns the status of the specified transfer.tsNetGetStatus(<pConnectionID>)
tsNetRetrErrorReturns the error message of a failed transfer.tsNetRetrError(<pConnectionID>)
tsNetRetrDataRetrieve any returned data from a transfer.tsNetRetrData(<pConnectionID>, <rError>)
tsNetRetrHeadersRetrieve any returned headers from a transfer.tsNetRetrHeaders(<pConnectionID>, <rError>)
tsNetRetrSentHeadersRetrieve any headers sent to the server during a transfer.tsNetRetrSentHeaders(<pConnectionID>, <rError>)
tsNetHeadSend an asynchronous request to a server specifying that no body be transferred.tsNetHead(<pConnectionID>, <pURL>, <pHeaders>, <pCallback>, [<pSettings>])
tsNetHeadSyncSend a synchronous request to a server specifying that no body be transferred.tsNetHeadSync(<pURL>, <xHeaders>, <rResult>, <rBytes>, [<pSettings>])
tsNetSendCmdSend an asynchronous command to a FTP or SFTP server.tsNetSendCmd(<pConnectionID>, <pURL>, <pCommand>, <pCallback>, [<pSettings>])
tsNetSendCmdSyncSend a synchronous command to a FTP or SFTP server.tsNetSendCmdSync(<pURL>, <pCommand>, <rResult>, <rBytes>, [<pSettings>])
tsNetCustomSend an asynchronous custom request to a server.tsNetCustom(<pConnectionID>, <pURL>, <pRequest>, <pHeaders>, <pCallback>, [<pSettings>])
tsNetCustomSyncSend a synchronous custom request to a server.tsNetCustomSync(<pURL>, <pRequest>, <xHeaders>, <rOutHeaders>, <rResult>, <rBytes>, [<pSettings>])
tsNetCustomUploadSend an asynchronous upload request to a server using a custom request method.tsNetCustomUpload(<pConnectionID>, <pURL>, <pRequest>, <pHeaders>, <pCallback>, <pData>, [<pSettings>])
tsNetCustomUploadSyncSend a synchronous upload request to a server using a custom request method.tsNetCustomUploadSync(<pURL>, <pRequest>, <xHeaders>, <pData>, <rOutHeaders>, <rResult>, <rBytes>, [<pSettings>])
tsNetCustomUploadFileSend an asynchronous upload request to a server which retrieves the data to be sent directly from a file using a custom request method.tsNetCustomUploadFile(<pConnectionID>, <pFile>, <pURL>, <pRequest>, <pHeaders>, <pCallback>, [<pSettings>])
tsNetCustomUploadFileSyncSend a synchronous upload request to a server which retrieves the data to be sent directly from a file using a custom request method.tsNetCustomUploadFileSync(<pFile>, <pURL>, <pRequest>, <xHeaders>, <rOutHeaders>, <rResult>, <rBytes>, [<pSettings>])
tsNetGetSend an asynchronous GET request to a server.tsNetGet(<pConnectionID>, <pURL>, <pHeaders>, <pCallback>, [<pSettings>])
tsNetGetSyncSend a synchronous GET request to a server.tsNetGetSync(<pURL>, <xHeaders>, <rOutHeaders>, <rResult>, <rBytes>, [<pSettings>])
tsNetGetFileSend an asynchronous GET request to a server which stores the returned data directly to a file.tsNetGetFile(<pConnectionID>, <pFile>, <pURL>, <pHeaders>, <pCallback>, [<pSettings>])
tsNetGetFileSyncSend a synchronous GET request to a server which stores the returned data directly to a file.tsNetGetFileSync(<pFile>, <pURL>, <xHeaders>, <rOutHeaders>, <rBytes>, [<pSettings>])
tsNetPostSend an asynchronous POST request to a server.tsNetPost(<pConnectionID>, <pURL>, <pHeaders>, <pPostData>, <pCallback>, [<pSettings>])
tsNetPostSyncSend a synchronous POST request to a server.tsNetPostSync(<pURL>, <xHeaders>, <pPostData>, <rOutHeaders>, <rResult>, <rBytes>, [<pSettings>])
tsNetUploadSend an asynchronous upload request to a server.tsNetUpload(<pConnectionID>, <pURL>, <pHeaders>, <pCallback>, <pData>, [<pSettings>])
tsNetUploadSyncSend a synchronous upload request to a server.tsNetUploadSync(<pURL>, <xHeaders>, <pData>, <rOutHeaders>, <rResult>, <rBytes>, [<pSettings>])
tsNetUploadFileSend an asynchronous upload request to a server which retrieves the data to be sent directly from a file.tsNetUploadFile(<pConnectionID>, <pFile>, <pURL>, <pHeaders>, <pCallback>, [<pSettings>])
tsNetUploadFileSyncSend a synchronous upload request to a server which retrieves the data to be sent directly from a file.tsNetUploadFileSync(<pFile>, <pURL>, <xHeaders>, <rOutHeaders>, <rResult>, <rBytes>, [<pSettings>])
tsNetSmtpSend an asynchronous upload request to a server.tsNetSmtp(<pConnectionID>, <pURL>, <pFrom>, <pRcpt>, <pCallback>, <pData>, [<pSettings>])
tsNetSmtpSyncSend a synchronous upload request to a server.tsNetSmtpSync(<pURL>, <pFrom>, <pRcpt>, <pData>, <rOutHeaders>, <rBytes>, [<pSettings>])
tsNetSmtpFileSend an asynchronous upload request to a server which retrieves the data to be sent directly from a file.tsNetSmtpFile(<pConnectionID>, <pFile>, <pURL>, <pFrom>, <pRcpt>, <pCallback>, [<pSettings>])
tsNetSmtpFileSyncSend a synchronous upload request to a server which retrieves the data to be sent directly from a file.tsNetSmtpFileSync(<pFile>, <pURL>, <pFrom>, <pRcpt>, <rOutHeaders>, <rBytes>, [<pSettings>])
Thank you for your feedback!

Was this page helpful?