[Spread-users] C# Issues

Energy Keeper energy.keeper at gmail.com
Sun Mar 14 04:13:21 EDT 2010


Hello,

I've recently been informed of the spread toolkit, and I look forward to
developing on top of it for a few client / server projects I've been wanting
to get into. I plan to write a GUI front end in C#, and Use perl for the
server side data accessors in conjunction with DBD::Pg and POE. However my
knowledge of C# is somewhat limited compared to perl. I'm still
uncomfortable with the language, and I have much to learn. (Which is why I'm
using spread, and not socket programing myself).

The API is poorly documented, or if its really well documented then I'm
really missing something.

I need to know exactly, how do I send and receive messages? The
SpreadMessage Constructor takes no arguments, and is not overloaded. Nor
does a SpreadMessage Object have any properties or methods to define a
message, or message data.

What I think, is he right way to do this is to send messages as XML so I can
implement some form of checking to ensure no packets were droped / lost. So
I need "some method" that returns a SpreadMessage Object that I can then
throw into SpreadConnection.Milticast.

Something like this:
[code=csharp]
namespace SpreadClient
{
       // This is held in a TabControl.TabPage
       // New Tabs are created for each joined group.
       // We will implement methods to send only to
       // our group, and all groups.
       public partial class SPMsg : UserControl
       {
                SpreadConnection conn;
                SpreadGroup group;

                public SPMsg ( SpreadConnection c, SpreadGroup g )
                {
                         this.conn = c;
                         this.group = g;
                         InitializeComponent();
                }
               public void SendMsg(string xmldata)
               {
                       conn.Mulicast(
                               MsgMaker.Msg(xmldata));
               }
       }
}

Of course other things need to be implemented as well like message recievers
and such. But I think I can use events for that, since the Spread Lib comes
with a few delegates that handle that. Anyway, My methods probably aren't
the best. And anyone that can offer help, or a better way to skin this cat,
I would be greatly appreciative.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.spread.org/pipermail/spread-users/attachments/20100314/26726087/attachment.html 


More information about the Spread-users mailing list