Click here to Skip to main content
15,913,773 members
Home / Discussions / C#
   

C#

 
QuestionThread.join Pin
benams7-Sep-11 0:28
benams7-Sep-11 0:28 
AnswerRe: Thread.join Pin
Pete O'Hanlon7-Sep-11 0:57
mvePete O'Hanlon7-Sep-11 0:57 
QuestionAre thre Mutex's that can be used in Silverlight? Pin
Xarzu6-Sep-11 7:59
Xarzu6-Sep-11 7:59 
AnswerRe: Are thre Mutex's that can be used in Silverlight? Pin
Pete O'Hanlon6-Sep-11 8:23
mvePete O'Hanlon6-Sep-11 8:23 
AnswerRe: Are thre Mutex's that can be used in Silverlight? Pin
Abhinav S6-Sep-11 19:34
Abhinav S6-Sep-11 19:34 
QuestionWhat is the Regular expression that detects a $ sign and digits in html code Pin
Member 82168286-Sep-11 7:21
Member 82168286-Sep-11 7:21 
AnswerRe: What is the Regular expression that detects a $ sign and digits in html code Pin
Pete O'Hanlon6-Sep-11 7:28
mvePete O'Hanlon6-Sep-11 7:28 
QuestionWebSocekts server! Pin
shay_lin5-Sep-11 22:07
shay_lin5-Sep-11 22:07 
QuestionCreate a web service to push messages to clients Pin
nitin_ion5-Sep-11 17:32
nitin_ion5-Sep-11 17:32 
GeneralRe: Create a web service to push messages to clients Pin
PIEBALDconsult5-Sep-11 18:53
mvePIEBALDconsult5-Sep-11 18:53 
GeneralRe: Create a web service to push messages to clients Pin
nitin_ion5-Sep-11 18:55
nitin_ion5-Sep-11 18:55 
GeneralRe: Create a web service to push messages to clients Pin
Pete O'Hanlon5-Sep-11 21:53
mvePete O'Hanlon5-Sep-11 21:53 
GeneralRe: Create a web service to push messages to clients Pin
nitin_ion6-Sep-11 0:00
nitin_ion6-Sep-11 0:00 
GeneralRe: Create a web service to push messages to clients Pin
Pete O'Hanlon6-Sep-11 0:11
mvePete O'Hanlon6-Sep-11 0:11 
GeneralRe: Create a web service to push messages to clients Pin
Roger Wright6-Sep-11 20:35
professionalRoger Wright6-Sep-11 20:35 
AnswerRe: Create a web service to push messages to clients Pin
Mehdi Gholam5-Sep-11 19:52
Mehdi Gholam5-Sep-11 19:52 
AnswerRe: Create a web service to push messages to clients Pin
BobJanova6-Sep-11 0:40
BobJanova6-Sep-11 0:40 
GeneralRe: Create a web service to push messages to clients Pin
nitin_ion6-Sep-11 0:42
nitin_ion6-Sep-11 0:42 
GeneralRe: Create a web service to push messages to clients Pin
Pete O'Hanlon6-Sep-11 0:44
mvePete O'Hanlon6-Sep-11 0:44 
GeneralRe: Create a web service to push messages to clients Pin
nitin_ion6-Sep-11 0:47
nitin_ion6-Sep-11 0:47 
GeneralRe: Create a web service to push messages to clients Pin
BobJanova6-Sep-11 3:15
BobJanova6-Sep-11 3:15 
GeneralRe: Create a web service to push messages to clients Pin
PIEBALDconsult6-Sep-11 2:41
mvePIEBALDconsult6-Sep-11 2:41 
GeneralRe: Create a web service to push messages to clients Pin
nitin_ion6-Sep-11 3:09
nitin_ion6-Sep-11 3:09 
GeneralRe: Create a web service to push messages to clients Pin
BobJanova6-Sep-11 3:23
BobJanova6-Sep-11 3:23 
Polling is trivial (a client side timer or other mechanism that repeatedly makes a request to the service asking about updates).

The comet method I haven't heard of before, but it seems to be an abuse of the TCP timeout mechanism whereby you stall a request until there is an update. I'm not sure there is a way to do that with a WCF service without going in at the low level. This form of polling is bad though (for the reason that persistent connections are: while that request is open, it counts against your machine socket resources, concurrent connections etc which are generally more precious than bandwidth), except for very specific cases where you know there will be an update soon (within a second or so).

You can use callbacks in a WCF client to respond to a service request asynchronously (i.e. you fire it off, continue processing and respond to the request you initiated later). This would typically be used as part of polling, as you don't want to stall client interaction while you want for a response.

Honestly, for a chat application, you are better off either using persistent connections (think IRC) for an update-critical standalone app, or using simple HTTP with client side polling (either through AJAX or thick client code doing a similar thing) for a less update-critical one or a web (in browser) chat. This is not what web services are for and they will get in the way rather than helping you.
GeneralRe: Create a web service to push messages to clients Pin
Pete O'Hanlon6-Sep-11 3:25
mvePete O'Hanlon6-Sep-11 3:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.