This project has moved and is read-only. For the latest updates, please go here.

OBEX Server-side

Is also supported. Use code like the following.

Dim lsnr As New ObexListener(ObexTransport. Bluetooth)
lsnr.Start()
' For each connection
Dim ctx As ObexListenerContext = lsnr.GetContext()
Dim req As ObexListenerRequest = ctx.Request
Dim pathSplits() As String = req.RawUrl.Split('/')
Dim filename As String = pathSplits(pathSplits.Length - 1)
req.WriteFile(filename)
'
lsnr.Stop()
var lsnr = new ObexListener(ObexTransport.Bluetooth);
lsnr.Start();
// For each connection
ObexListenerContext ctx = lsnr.GetContext();
ObexListenerRequest req = ctx.Request;
String[] pathSplits = req.RawUrl.Split('/');
String filename = pathSplits[pathSplits.Length - 1];
req.WriteFile(filename);
//
lsnr.Stop();

See also the DesktopListener and DeviceListener sample programs.

See also One Active Server

Last edited Jan 26, 2012 at 8:41 PM by alanjmcf, version 5