简体   繁体   中英

Android/iOS client consumes WCF Duplex service

I am trying to build a server/web service which provides APIs to Android/iOS client. I am using WCF service and clients can send request to server successfully. Now, I am going to make server enable to ping client to notify that there some changes in server and client need to synchronize data.

The question is: Is it possible to enable my server to ping client (Android/iOS), I knew that it is possible for Windows client by using wsDualHttpBinding but I am not sure about iOS and Android client. Anyone can help me to make it clear? Any solution is appreciated.

I don't think you can do it. For start, while wsDualHttpBinding is intended to be interoperable I don't beleive in practice it is supported by any otehr framework than WCF. Then wsDualHttpBinding uses a client callback url that the server needs to contact. This url is not going to be accessible on a phone. You should use websockets, long polling or some proprietary push mechanism of the device os.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM