Hello,
When I do request for service call that time my coroutine freeze my game until response not come…
How can i do service request in unity coroutine or i used threading for that…plz help me
IEnumerator ServiceCall() {
ChannelFactory<IService> factory_1 = null;
IService channel_1 = null;
string resultstr = "";
try {
WSHttpBinding binding = new WSHttpBinding ();
EndpointAddress address = new EndpointAddress ("https://192.168.0.1/Service/Service.svc");
binding.Security.Mode = SecurityMode.Transport;
factory_1 = new ChannelFactory<IService> (binding, address);
factory_1.Credentials.ServiceCertificate.Authentication.CertificateValidationMode = X509CertificateValidationMode.None;
channel_1 = factory_1.CreateChannel ();
resultstr = channel_1.GetData(10);
yield return new WaitForSeconds (5);
Debug.Log(resultstr);
} catch (Exception e) {
Debug.Log (e.Message);
}
yeild return break;
}