Indigo Rose Software

Professional Software Development Tools

 
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 17
  1. #1
    Join Date
    Apr 2007
    Location
    Mar Sara
    Posts
    292

    Need some help about TCP/IP communication

    I have two options: ApplicationMessageCenter and LuaSockets. Both aren't so easy to implement:

    LuaSockets can be easy to implement, but it is very confusing because of the big number of steps required, and I haven't worked on an application that communicates directly via TCP/IP.

    ApplicationMessageCenter needs .NET, but that's not the problem. The problem is that it has a server, and clients. Well, I need a combination of client & server and some clients, so that the clients can communicate between them via the server, but the server must be able to send messages to other clients.

    Having 2 applications running on one computer to do something that could be done by one application isn't a good thing at all.

    Basically I want to make an Internet Cafe administration suite, with the possibility for the clients to communicate between them (so that the users can chat without shouting around), but the cafe admin must be able to see everything that they do (easily done with RemoteDesktopViewer), what they chat about, and be able to open and close PCs.

    Thank you for reading this long post and I hope that you can help me.

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

    ApplicationMessageCenter

    Hello

    Did you try to build client+server (2 in 1) application and you failed?
    The server does not send anything. The server only stores messages. It is the client's job to receive messages. By designing a client to send a message to all registered clients (exluding itself) you may achieve what you want. The limitation is that you can't get a list of registered clients, so you must know from before the clients names.
    When a client receives a message it removes also that message from the server, so there is no way (right now in this version) to just read the message of some client (it would make a good option to have). Another good option to have would be to be able to get a list of registered clients.

    The dll itself is a two in one solution (client + server).
    All clients have equal rights. Probably it would have been better to design some admin api.

    The vista users may have noticed that net 2.0 is built in. No need to take some action. But i have noticed that some applications written for .net 2.0 do not work under vista or have upredictable behaviour. This has to to with the vista api that has changed radically (despite ms good intentions to keep backward compatibility). I will do what i can and as soon as i can to adjust that.

    With Kind Regards
    sside

  3. #3
    Join Date
    Apr 2007
    Location
    Mar Sara
    Posts
    292
    Yes, I failed, and it is crucial for the server to be able to read the messages and be able to send messages knowing either computer name or IP (since I won't know how the Cafe Admin will choose to set up the software.

    I'm not worried about Vista yet, since most of the computers will be running on XP and the server might be XP or 2003.

  4. #4
    Join Date
    Apr 2007
    Location
    Mar Sara
    Posts
    292
    OK, I lurked around and came up with something.

    I can get a list of all the computers connected to the admin pc (we'll call it server), including computer name (aka host), IP address and MAC address. I'll use the host as an identifier. I want to send a command to the server from a client when the user types a message for client X and presses send:

    Code:
    SendMessage(NET_PC_2, Just testing the stuff)
    The server will log the computer name, time & message, then send the message to the destination client. Client 1 will see his message, client 2 will see client's 1 message and the server will see client's 1 message.

    But this is just 1 function. The server must be able to send OpenComputer() and CloseComputer() commands to any client and the client will act accordingly.

    The thing is, can I do this simply, without loads of error checks, via two simple actions: ReceiveMessage() and SendMessage(strComputerHost). The ReceiveMessage() action will be called every 10 ms.

  5. #5
    Join Date
    Dec 2003
    Location
    The Netherlands
    Posts
    475
    The server must be able to send OpenComputer() and CloseComputer() commands to any client and the client will act accordingly.
    Do you mean you are looking for an option to check if the server is online? Why server should be able to send an OpenComputer() and CloseComputer() , to what point and purpose?

    The thing is, can I do this simply, without loads of error checks, via two simple actions: ReceiveMessage() and SendMessage(strComputerHost).
    The error check is optional. If you don't need to process the error then don't. Beware when using ReceiveMessage. If server is offline or there is no message ReceiveMessage then will return an empty string and without the conditional if (as seen in the example) you will be processing empty strings.

    I have the (c++) project open for hours and yet have not been able to write any line of code so far (bussy). My idea is to add a few things like check for server if online and to get a list of clients.

    With Kind Regards
    sside

  6. #6
    Join Date
    Apr 2007
    Location
    Mar Sara
    Posts
    292
    OpenComputer() & CloseComputer() will do what their name says: open or close a computer. I already said that this is an admin suite for Internet Cafes.

    The server will always be online, don't worry. If it isn't, it's not the fault of the application, it's the fault of the administrator.

  7. #7
    Join Date
    Dec 2003
    Location
    The Netherlands
    Posts
    475
    OpenComputer() & CloseComputer() will do what their name says: open or close a computer.
    I might be out of sync here, but do you mean OpenComputer() & CloseComputer() will turn on and off computer or what?

    With Kind Regards
    sside

  8. #8
    Join Date
    Apr 2007
    Location
    Mar Sara
    Posts
    292
    No, it will lock it with a black screen. The client application will be set as always on top and resized to full screen, as well as an image object placed over everything.

  9. #9
    Join Date
    Apr 2004
    Location
    Vancouver, Canada
    Posts
    1,790
    If it were me I would just buy an app for this purpose. Why reinvent the wheel. Plus I don't think AMS is the right tool for this.

    This looks pretty good and not too expensive. http://www.cafemanager.com/

    When you add up the time it would take to create your own, it will be way more expensive. Just my opinion.
    Dermot

    I am so out of here

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

    ApplicationMessageCenter.v.1.0.0.1

    Now you can use client+server in one.
    Get a list of subscribed clients.
    Read message.

    IsServerOnline must be tunned up. Also read message, must be done index based (if you want to browse throught client's messages). I'll look into this the comming days.
    Also for the option of shutting down clients, i'll look at it the comming days.

    With Kind Regards
    sside

  11. #11
    Join Date
    Dec 2003
    Location
    The Netherlands
    Posts
    475
    Quote Originally Posted by Dermot View Post
    If it were me I would just buy an app for this purpose. Why reinvent the wheel. Plus I don't think AMS is the right tool for this.

    This looks pretty good and not too expensive. http://www.cafemanager.com/

    When you add up the time it would take to create your own, it will be way more expensive. Just my opinion.
    Why you write applications at first place, Dermot?
    But i do agree with you, ams might not be the right tool for that.

    With Kind Regards
    sside

  12. #12
    Join Date
    Apr 2007
    Location
    Mar Sara
    Posts
    292
    It isn't for me, I'm making this to sell it. 300 euros for unlimited clients is a bit steep IMO, this application is going to be 10 euros. Most Internet Cafes that I've been at were using pirated versions of CafeManager, for the same reason: too expensive. The manager told me that they were forced to do this because most cafes were closed because students were skipping schools days to play some games, and thus they didn't have enough clients to afford it.

    The thing that I need is simple TCP communication, either via IP or computer name (doesn't really matter, it's going to be on LAN). .NET isn't a problem, and as I said, it's going to be Windows XP, either Home or Professional (mostly Pro). I understand that AMS isn't the right thing for this, but if the Simple Chat Application and Simple Web Server by Worm worked, I don't see why this wouldn't.

  13. #13
    Join Date
    Apr 2004
    Location
    Vancouver, Canada
    Posts
    1,790
    Why you write applications at first place, Dermot?
    I thought he was building it for himself or a friend because I thought I had read another post about the same thing. Maybe it was someone else.

    300 euros for unlimited clients is a bit steep IMO,
    When you consider the cost of a premises and all the hardware, 300 euros is a pretty small price for a very important part of the business IMO. But I don't know much about the business. I visited internet cafes a lot when I lived in Spain and they all had very good systems for managing all the computers including billing by the minute etc.
    Dermot

    I am so out of here

  14. #14
    Join Date
    Apr 2007
    Location
    Mar Sara
    Posts
    292
    Quote Originally Posted by sside View Post
    Now you can use client+server in one.
    Get a list of subscribed clients.
    Read message.

    IsServerOnline must be tunned up. Also read message, must be done index based (if you want to browse throught client's messages). I'll look into this the comming days.
    Also for the option of shutting down clients, i'll look at it the comming days.

    With Kind Regards
    sside
    The computers won't be shut down. Once the client gets the command via message, it makes itself black, full screen and always on top.

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

    ApplicationMessageCenter Library (v.1.0.0.2)

    http://indigorose.com/forums/showthr...862#post106862

    Use SetEntryStatus to set the client status (Grant, Deny).
    Use GetEntryInfo to get the client's status. If status is Deny then shut the client down (black screen or whatever).
    Use ReadMessage to read client's messages (index based).

    You can use client+server in one ui. But apart you have more flexibility. For example you can set client's status to Deny from your computer at home... etc...etc.

    With Kind Regards
    sside

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Winsock - TCP/IP?
    By M626 in forum AutoPlay Media Studio 6.0
    Replies: 1
    Last Post: 10-01-2005, 05:58 PM
  2. Client & Server Communication
    By Elleah in forum TrueUpdate 2.0
    Replies: 11
    Last Post: 06-02-2005, 07:09 PM
  3. Variable Communication Beetween 2 Apps
    By Fashion in forum AutoPlay Media Studio 5.0
    Replies: 10
    Last Post: 09-22-2004, 05:09 PM
  4. Real-Time Communication between apps
    By Josué Alba in forum AutoPlay Media Studio 5.0
    Replies: 2
    Last Post: 09-07-2004, 08:42 PM
  5. Check for Active TCP/IP connection?
    By basehitter10 in forum TrueUpdate 1.0
    Replies: 1
    Last Post: 02-23-2004, 03:10 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