You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Peter Foot edited this page Mar 31, 2017
·
1 revision
OBEX Server-side
Is also supported. Use code like the following.
{code:vb.net}
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()
{code:vb.net}
{code:c#}
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 = pathSplitspathSplits.Length - 1;
req.WriteFile(filename);
//
lsnr.Stop();
{code:c#}
See also the DesktopListener and DeviceListener sample programs.