开发者

Sending & Receiving "Nudges" via tcp?

开发者 https://www.devze.com 2022-12-19 20:45 出处:网络
I\'m tyring to add a feature to my app that sends a nudge to all users of my program开发者_开发问答 (family members inside the house), and when they receive the nudge the window of my app on their com

I'm tyring to add a feature to my app that sends a nudge to all users of my program开发者_开发问答 (family members inside the house), and when they receive the nudge the window of my app on their computer shakes for a second...

Can somebody please suggest how i'd have to go about this? I've never worked with tcp/ip before.. Is this what I should use, or is there something better?

I have tried to come up with my own solution however none of the samples ever work. So I thought maybe the people on SO might know of other ways?

Thank you :)


If this is just an "in-house" (pardon the pun) application, and you're all on the same network, you might consider sending a UDP broadcast packet. Each instance of your application could listen for a packet on a particular port, and when the correct one is received do the window shake thing.


You might consider UDP for this. Since you can broadcast/multicast via UDP it may be more suitable for this sort of application. There are downsides - UDP transmission is not reliable or guaranteed in the same way as TCP.


I'd go with a good XMPP Library. Maybe Jabber-Net?

You'll also have the added bonus of being able to connect to Google Chat and now Facebook chat later.

You haven't specified if presence in your case requires a server or not. If it is client/server oriented, using XMPP gives you the server side for "free" as a bonus.

0

精彩评论

暂无评论...
验证码 换一张
取 消