Written in 2008

On the WebRequest Pattern

The library does not implement the WebRequest pattern. This pattern, as generally used in its HttpWebRequest form, is most suited to that protocol, which is of course session-less. FTP and OBEX are session based, so on the same transport connection they can for instance connect, with authentication, perhaps then change directory, list its contents, then upload one file, and download another. To fit the WebRequest Pattern there has to be lots of magic behind the scenes to make a second FtpWebRequest instance use the connection that a previous instance finished using some time before... This also makes a very odd programming experience for the consuming developer, so, at the moment there’s no such implementation, as my view that the library’s session-based API is very much easier to use.

The sample TransportConnection library includes a class UriObexSessionConnection which takes a URI of a similar format to that used by 32feet.NET’s ObexWebRequest class, and forms a connection to the specified device and OBEX service, this can be used if converting your code between the two libraries.

Last edited May 15, 2014 at 6:39 PM by alanjmcf, version 1