Click here to Skip to main content
15,902,299 members
Home / Discussions / C#
   

C#

 
GeneralRe: Retrieve Listbox items Pin
BillAnton25-May-04 5:25
BillAnton25-May-04 5:25 
GeneralRe: Retrieve Listbox items Pin
netclectic25-May-04 5:44
netclectic25-May-04 5:44 
GeneralRe: Retrieve Listbox items Pin
BillAnton25-May-04 10:29
BillAnton25-May-04 10:29 
GeneralChange Font Size through out the application Pin
Chris#25-May-04 4:26
Chris#25-May-04 4:26 
GeneralRe: Change Font Size through out the application Pin
Judah Gabriel Himango25-May-04 4:44
sponsorJudah Gabriel Himango25-May-04 4:44 
GeneralRe: Change Font Size through out the application Pin
leppie25-May-04 9:30
leppie25-May-04 9:30 
GeneralRemoting question Pin
Judah Gabriel Himango25-May-04 4:24
sponsorJudah Gabriel Himango25-May-04 4:24 
GeneralRe: Remoting question Pin
Heath Stewart25-May-04 6:03
protectorHeath Stewart25-May-04 6:03 
The clients really just need to provide an object which the server communicates (like callbacks). This, of course, has to be a remotable object, but you don't need to worry about connecting back to the client so long as you are using a channel that supports 2-way communication, like the TcpChannel. By the very nature of HTTP, this won't work (although there are elaborate ways to simulate 2-way communication using polling, and IIRC there's one on CodeProject).

Just find a decent .NET Remoting chat example. There's plenty available on the 'net and probably a few here on CodeProject as well. It's a pretty simple concept where the server stores the client object and communicates with it. Using sponsors and lifetime management effectively (see ILease and ISponsor interface documentation in the .NET Framework SDK), you could even remove clients from an internal IList (or whatever you want to use) when they disconnect (of course always do error-checking and remove the client in case they're not connected and their sponsor has not yet timed out).

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: Remoting question Pin
Judah Gabriel Himango25-May-04 6:09
sponsorJudah Gabriel Himango25-May-04 6:09 
GeneralRe: Remoting question Pin
Heath Stewart25-May-04 6:48
protectorHeath Stewart25-May-04 6:48 
GeneralRe: Remoting question Pin
Judah Gabriel Himango25-May-04 8:19
sponsorJudah Gabriel Himango25-May-04 8:19 
GeneralRe: Remoting question Pin
Heath Stewart25-May-04 8:25
protectorHeath Stewart25-May-04 8:25 
GeneralRe: Remoting question Pin
Judah Gabriel Himango25-May-04 10:02
sponsorJudah Gabriel Himango25-May-04 10:02 
GeneralNew DataRow in SQL-Server with ID Pin
Anonymous25-May-04 4:18
Anonymous25-May-04 4:18 
GeneralRe: New DataRow in SQL-Server with ID Pin
Heath Stewart25-May-04 5:57
protectorHeath Stewart25-May-04 5:57 
GeneralRe: New DataRow in SQL-Server with ID Pin
denizmercan25-May-04 20:05
denizmercan25-May-04 20:05 
GeneralVideo scrambled the second time Pin
thomasa24-May-04 23:38
thomasa24-May-04 23:38 
GeneralRe: Video scrambled the second time Pin
Aaron Eldreth25-May-04 2:49
Aaron Eldreth25-May-04 2:49 
GeneralRe: Video scrambled the second time Pin
Heath Stewart25-May-04 3:44
protectorHeath Stewart25-May-04 3:44 
GeneralI think I've locaded the problem Pin
thomasa25-May-04 20:47
thomasa25-May-04 20:47 
GeneralRe: I think I've locaded the problem Pin
Dave Kreskowiak26-May-04 3:01
mveDave Kreskowiak26-May-04 3:01 
Generaldatagrid doesn't save the data Pin
denizmercan24-May-04 23:23
denizmercan24-May-04 23:23 
GeneralRe: datagrid doesn't save the data Pin
Anfernius25-May-04 0:15
Anfernius25-May-04 0:15 
GeneralRe: datagrid doesn't save the data Pin
denizmercan25-May-04 1:01
denizmercan25-May-04 1:01 
GeneralRe: datagrid doesn't save the data Pin
Heath Stewart25-May-04 3:37
protectorHeath Stewart25-May-04 3:37 

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.