convert to vb.net code
Posted: Sat Nov 05, 2016 7:10 pm
Hi
I try to convert this C# code To VB.Net
SIPTransport sipTransport = new SIPTransport(SIPDNSManager.ResolveSIPService, new SIPTransactionEngine());
SIPUDPChannel udpChannel = new SIPUDPChannel(new IPEndPoint(IPAddress.Any, 5060));
sipTransport.AddSIPChannel(udpChannel);
It would be something like this
Dim sipTransport SIPTransport = new SIPTransport(SIPDNSManager.ResolveSIPService, new SIPTransactionEngine())
Dim udpChannel SIPUDPChannel = new SIPUDPChannel(new IPEndPoint(IPAddress.Any, 5060))
sipTransport.AddSIPChannel(udpChannel)
But this line won't be converted
Dim sipTransport SIPTransport = new SIPTransport(SIPDNSManager.ResolveSIPService, new SIPTransactionEngine())
The part "SIPDNSManager.ResolveSIPService" i don't understan.
When i look in to the originating code "ResolveSIPService" actually should be ResolveSIPService(xxx,yyy) or ResolveSIPService(xxx as string).
Can some one explain to me how I can use SIPDNSManager.ResolveSIPService with out passing any arguments?
In VB.Net this won't work because if I change ResolveSIPService to be ResolveSIPService(hostname) it say that this is a endpoint but needs to be endpoint delegate.
Regards
Christian Enroth
I try to convert this C# code To VB.Net
SIPTransport sipTransport = new SIPTransport(SIPDNSManager.ResolveSIPService, new SIPTransactionEngine());
SIPUDPChannel udpChannel = new SIPUDPChannel(new IPEndPoint(IPAddress.Any, 5060));
sipTransport.AddSIPChannel(udpChannel);
It would be something like this
Dim sipTransport SIPTransport = new SIPTransport(SIPDNSManager.ResolveSIPService, new SIPTransactionEngine())
Dim udpChannel SIPUDPChannel = new SIPUDPChannel(new IPEndPoint(IPAddress.Any, 5060))
sipTransport.AddSIPChannel(udpChannel)
But this line won't be converted
Dim sipTransport SIPTransport = new SIPTransport(SIPDNSManager.ResolveSIPService, new SIPTransactionEngine())
The part "SIPDNSManager.ResolveSIPService" i don't understan.
When i look in to the originating code "ResolveSIPService" actually should be ResolveSIPService(xxx,yyy) or ResolveSIPService(xxx as string).
Can some one explain to me how I can use SIPDNSManager.ResolveSIPService with out passing any arguments?
In VB.Net this won't work because if I change ResolveSIPService to be ResolveSIPService(hostname) it say that this is a endpoint but needs to be endpoint delegate.
Regards
Christian Enroth