Indigo Rose Software

Professional Software Development Tools

 
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 16
  1. #1
    Join Date
    Dec 2003
    Location
    The Netherlands
    Posts
    475

    ApplicationMessageCenter Library

    ApplicationMessageCenter library (ApplicationMessageCenter.dll v.1.0.0.0).
    ApplicationMessageCenter library makes possible that 2 or more application to comunicate with each other. It is a 2 in 1 solution, client and server.

    Actions:
    ApplicationMessageCenter.Client.Connect
    ApplicationMessageCenter.Client.Disconnect
    ApplicationMessageCenter.Client.AddEntry
    ApplicationMessageCenter.Client.RemoveEntry
    ApplicationMessageCenter.Client.ExistsEntry
    ApplicationMessageCenter.Client.SendMessage
    ApplicationMessageCenter.Client.ReceiveMessage
    ApplicationMessageCenter.Client.IsClientChannelReg istered
    ApplicationMessageCenter.Client.GetError
    ApplicationMessageCenter.Server.Start
    ApplicationMessageCenter.Server.Stop
    ApplicationMessageCenter.Server.IsServerChannelReg istered
    ApplicationMessageCenter.Server.GetError

    Download:
    ApplicationMessageCenter.v.1.0.0.0

    Contents:
    ApplicationMessageCenter.xml //Actions. Drop this to: C:\Program Files\AutoPlay Media Studio 5.0 Professional\Data\Actions.
    ApplicationMessageCenter.Blank.Project.apt //Template. Drop this to: C:\Program Files\AutoPlay Media Studio 5.0 Professional\Templates.
    Client1.apz //Demo. A demo project to show the ApplicationMessageCenter.dll usage.
    Client2.apz //Demo. A demo project to show the ApplicationMessageCenter.dll usage.
    Server.apz //Demo. A demo project to show the ApplicationMessageCenter.dll usage.

    Start the server and both clients to see what it does. It is a simple project where 2 client can exchange messages with each other. When you start the server some firewalls can/will ask you for permission. Grant it if you want to see what it does, otherwise not.

    Client applications can exchange messages not only from the same computer but also from lan and wan. Clients and server can be in different computer, cities, countries etc. 2 clients and a server can be in 3 different computers.

    3 protocols are supported:
    1-Http
    2-Tcp
    3-Ipc (only when the clients are in the same computer).

    Server can operate in three protocols in the same time. Client only one at a time. Thus clients can connect at server at any channel assuming that server is listening for incomming calls at all channels.

    It is important that the dll stays at the root dir (where the exe is).

    How to use it:
    How you like it. But as a rule follow this patterns:

    Code:
    ApplicationMessageCenter.Client.Connect(Channel, Host);
    Channel: You can choose from the 3 channels Http, Tcp, Ipc.
    Host: Computername for lan. Ip address for wan.
    Required. This is the very first actions a client must call.

    Code:
    ApplicationMessageCenter.Client.AddEntry(AppId);

    AppId: Any unique string value.
    Optional. AddEntry is optional. It is not needded to send but to receive yes. It is a kind of message box that will be created at server where messages will be stored untill you recive them.

    After you are successfully connected you can send messages.
    Code:
    ApplicationMessageCenter.Client.SendMessage(sender, receiver, messageText, messageData);
    After you have connected and created the entry (AddEntry) you can receive (or send) messages.
    Code:
    ApplicationMessageCenter.Client.ReceiveMessage(receiver);
    Messages are not defined. It is up to you to define your own messages.
    Applications can exchange not only messages but also files (small files though). But right now we keep it simple and exchange only messages

    .Net 2.0 required.

    With Kind Regards
    sside

  2. #2
    Join Date
    May 2004
    Location
    Belgium
    Posts
    129

    COOOooooollllll

    This is something to Toy with

    Thnx for sharing

  3. #3
    Join Date
    Sep 2006
    Posts
    3

    Thanks

    Can you attach this to a post as your website appears to be down, thanks.

  4. #4
    Join Date
    Dec 2003
    Location
    The Netherlands
    Posts
    475
    With Kind Regards
    sside

  5. #5
    Join Date
    Dec 2003
    Location
    The Netherlands
    Posts
    475

    ApplicationMessageCenter Library (v.1.0.0.2)

    Functions:
    1. AddEntry
    2. RemoveEntry
    3. ExistsEntry
    4. GetEntries
    5. GetEntryInfo
    6. SetEntryStatus
    7. SendMessage
    8. ReceiveMessage
    9. ReadMessage
    10. GetMessageCount
    11. Connect
    12. Disconnect
    13. IsClientChannelRegistered
    14. GetClientError
    15. Start
    16. Stop
    17. IsServerChannelRegistered
    18. GetServerError

    .Net 2.0 required

    With Kind Regards
    sside

  6. #6
    Join Date
    Apr 2007
    Posts
    165
    Woow ****. This is what i needed for a long time. Big big thanks

  7. #7
    Join Date
    Apr 2007
    Posts
    165

    Huh? Crap did i do something wrong? *Sigh*

    Hi can somebody help me with an error. ive coded something together al week long and it works so far until i need to read a message. this is the code i use to read it.

    Code:
    nmsg = ApplicationMessageCenter.GetMessageCount(server);
    	nmsg = String.ToNumber(nmsg)
    	Label.SetText("Messages:", "Messages: "..nmsg.."");
    	
    	if nmsg > 0 then
    		for x = 1, nmsg do
    			msg = ApplicationMessageCenter.ReadMessage(server, x) -- .Sender  .Receiver  .Text   .Data   .Time
    			Label.SetText("Text =", "Text = "..msg.Text);
    			Label.SetText("Data =", "Data = "..msg.Data);
    		end
    	end
    i send a message with my client and then the server that needs to recieve that message executes the code above. Label "Messages:" text changes to "Messages: 1". then it reads it but doesnt put out anything in the labels "Text =" and "Data =" and i am 100% sure it gets to those lines:
    Code:
    Label.SetText("Text =", "Text = "..msg.Text);
    			Label.SetText("Data =", "Data = "..msg.Data);
    I slightly modified the functions names only the ones like this: ApplicationMessageCenter.Server.Start changed to ApplicationMessageCenter.ServerStart (i did this to properly create an xml for the action wizzard so that it shows up there). Further i didnt move the dll or changed its name. i even tryed to get an error with some code i deleted but it doesnt return any message. I feel a bit down right now because i spend very much ours coding something and now when i get to a point that it needs to work and it doesnt. Sside or someone else can you help me please. Thanks people.

  8. #8
    Join Date
    Dec 2003
    Location
    The Netherlands
    Posts
    475
    Teqskater

    A few things i would think of:
    1. Make sure thew server is listening.
    2. ReadMessage index is zero bassed (for x=0).
    3. Make sure you are sending to the correct server (check server name).

    What number returns GetMessageCount? Is it bigger than 0?
    If that be the case then put a messagebox inside the loop and see if sender is being displayed properly.

    With Kind Regards
    sside

  9. #9
    Join Date
    Apr 2007
    Posts
    165
    I found the trouble. I didnt know that the ReadMessage index was zero based. And it doesnt work with the ICP channel (no problem for me because i use ICP now). But i have another question: when you read a message it doesnt go away out of the entry? How does the recieve message function work if there are two messages or more? does it read message one for example and the next time its called message two or how does it work? Thanks for your help so far! Btw im creating a multiplayer card game with it and i think when im done i release the source code over here in the forums i think. it also has more then 10 functions that deal cards, turnover cards ETC.
    Last edited by Teqskater; 08-14-2008 at 06:30 PM.

  10. #10
    Join Date
    Dec 2003
    Location
    The Netherlands
    Posts
    475
    Teqskater

    Ipc channel works only for local connections. It does not work for remote connections. One example would be when the server and client are located in same computer.

    ReadMesage does not remove the message.

    ReceiveMessage gets you the message and removes it from the message queue (fifo). If there are more messages then call ReceiveMessage in a loop, page timer, or until returns an empty string.

    With Kind Regards
    sside

  11. #11
    Join Date
    Apr 2007
    Posts
    165

    Alright. Thanks

    Alright thanks again forgot to mention in the previous post that i was using ICP localy and it still didnt work and i was pretty sure i didnt do anything wrong. But i could be wrong. I never now because i changed the code now.

    Alright it works now. I simply changed ReadMessage To Recievemessage. Now everything works.

    Big thanks,

    Teqskater

  12. #12
    Join Date
    Dec 2003
    Location
    The Netherlands
    Posts
    475
    Make sure then that the server is also listening in Ipc channel.

    With Kind Regards
    sside

  13. #13
    Join Date
    Apr 2007
    Posts
    165
    Oh forgot this. Wich ports does it use. i cant find them.

  14. #14
    Join Date
    Dec 2003
    Location
    The Netherlands
    Posts
    475
    You don't need the port nr to connect to a server.

    Here they are for your convinience:

    Http channel (11771)
    Tcp channel (11772)
    Ipc chanel (11773)

    You could run a netstat and get those numbers as well.

    With Kind Regards
    sside

  15. #15
    Join Date
    Apr 2007
    Posts
    165
    I know that but i need those port numbers to forward them in my router etc.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Access database library
    By sside in forum AutoPlay Media Studio 5.0
    Replies: 5
    Last Post: 02-25-2009, 07:50 AM
  2. Image library
    By sside in forum AutoPlay Media Studio 5.0
    Replies: 8
    Last Post: 05-30-2006, 05:22 AM
  3. i need a help file for LuaSocket library
    By lnd in forum AutoPlay Media Studio 6.0
    Replies: 5
    Last Post: 04-01-2006, 09:32 PM
  4. AMS5 Code & Example Library.
    By sside in forum AutoPlay Media Studio 5.0
    Replies: 11
    Last Post: 02-25-2005, 01:28 AM
  5. Anyone Suggest A Graphics Library and Printer?
    By wwwScottRohcom in forum AutoPlay Media Studio 4.0
    Replies: 6
    Last Post: 08-14-2002, 01:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts