Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

MBS Xojo Network Kit

NSURLConnectionMB class:

Class NSURLConnectionMB
ComputedProperty currentRequest As NSURLRequestMB
Sub Set() End
Sub Get() // new in Mac OS X 10.8 and iOS 5.0 End
End ComputedProperty
ComputedProperty originalRequest As NSURLRequestMB
Sub Set() End
Sub Get() // new in Mac OS X 10.8 and iOS 5.0 End
End ComputedProperty
Const FoundationLib = Foundation.framework
Event Close() End
Event connectionDidFailWithError(Error as NSErrorMB) End
Event connectionShouldUseCredentialStorage() As Boolean End
Event connectionWillSendRequestForAuthenticationChallenge(challengeRef as Integer) End
Event willStart() End
Protected Sub Constructor() // private constructor End
Sub Destructor() // cleanup End
Shared Function canHandleRequest(request as NSURLRequestMB) As Boolean 'Performs a "preflight" operation that performs 'some speculative checks to see if a connection can 'be initialized, and the associated I/O that is 'started in the initializer methods can begin. ' 'The result of this method is valid only as long as 'no protocols are registered or unregistered, and 'as long as the request is not mutated (if the 'request is mutable). Hence, clients should be 'prepared to handle failures even if they have 'performed request preflighting by calling this 'method. ' 'request The request to preflight. ' 'Returne true if it is likely that the given request can be used to 'initialize a connection and the associated I/O can be 'started End
Sub cancel() // cancel transfer End
Shared Function sendSynchronousRequest(request as NSURLRequestMB, byref response as NSURLResponseMB, byref Error as NSErrorMB) As MemoryBlock // Performs a synchronous load of the given request, // returning an NSURLResponse in the given out // parameter. // A synchronous load for the given request is built on // top of the asynchronous loading code made available // by the class. The calling thread is blocked while // the asynchronous loading system performs the URL load // on a thread spawned specifically for this load // request. No special threading or run loop // configuration is necessary in the calling thread in // order to perform a synchronous load. For instance, // the calling thread need not be running its run loop. // request: The request to load. Note that the request is // deep-copied as part of the initialization // process. Changes made to the request argument after // this method returns do not affect the request that is // used for the loading process. // response: An out parameter which is filled in with the // response generated by performing the load. // error: Out parameter used if an error occurs // while processing the request. Will not be modified if the // load succeeds. // Result: The content of the URL resulting from performing the load, // or nil if the load failed. End
Sub start() // starts transfer End
Note About
Property Handle As Integer
Property IsLoading As Boolean
Property TotalSize As Int64
Property done As Boolean
End Class




Links
MBS Xojo Plugins