Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

shriram gunjotikar

@shriram gunjotikar
About
Posts
1
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Send Data Parallaly to Clients
    S shriram gunjotikar

    Hi, I have written a publish service in WCF which publishes some data to the clients who have subscribed to the particular topic. For that I am retrieving the list of clients from the database and sending data to the clients. But the problem here is it is sending data serially. I mean according to the order in which the clients are saved in the database. For example client1 receives message at 12.30.41 and client 200 receives message at 12.31.55. Is there any way I can send the data at one shot? Here is the code: static void Publish(T[] subscribers,bool closeSubscribers, string methodName, params object[] args) { WaitCallback fire = delegate(object subscriber) { Invoke(subscriber as T,methodName,args); if(closeSubscribers) { using(subscriber as IDisposable) {} } }; Action queueUp = delegate(T subscriber) { ThreadPool.QueueUserWorkItem(fire,subscriber); }; Array.ForEach(subscribers,queueUp); } static void Invoke(T subscriber,string methodName,object[] args) { Type type = typeof(T); MethodInfo methodInfo = type.GetMethod(methodName); try { methodInfo.Invoke(subscriber,args); } catch {} } Please help.

    WCF and WF help csharp database wcf data-structures
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups