Results 1 to 6 of 6

Thread: [Resolved] Client-server Application

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 2005
    Location
    Bentonville, AR
    Posts
    22

    [Resolved] Client-server Application

    Hi, I need advice on what method to use for a client-server application. The server plays audio files and the client needs to send the information like "filename" and play, stop, pause commands. i was thinking of using winsock, but i'm having trouble programming it.

    Thanks,

    Cory G.
    Last edited by corydg; Nov 15th, 2005 at 11:55 PM.

  2. #2
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    Re: Client-server Application

    what problems are you having?

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Nov 2005
    Location
    Bentonville, AR
    Posts
    22

    Re: Client-server Application

    Actually, I guess my first question is can Winsock handle commands and data. this must be instant triggers. So as Soon as somebody presses play on the client, the server starts playing.

    I really don't know where to begin. I've tried, but was never able, to receive commands or data more than once, without have to restart the program.

  4. #4
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    Re: Client-server Application

    Ok well the answer is yes, winsock can handle data it can send files text string numbers etc. The question is how do you set up your triggers?

    Well this is the way I would set this up. I would have the server application (Which will play the music files) and then the server relays to it commands these command you will make, so get a pen and paper and start jotting down commands, we dont want to send big long words because it takes too long (Lets think efficancy)

    so....

    a = Start
    b = Stop
    c = Pause

    etc etc you make the commands

    Now then what you would need to do on the server is interpret these commands, we use somthing called callbyname which will search the incomming text and see which command it is, it will then go to that command and the server will perform the action. Fairly simple. Theres more information on this, Here = http://winsockvb.com/article.php?article_id=25

    Now then thats the theory behind the practical coding. if you are having problems with the winsock side of things then take a look at the links below, the first link shows a caht application, using the Winsock.Send method which is waht you will use to send commands to the server.

    http://www.vbforums.com/showthread.php?t=297308
    http://winsockvb.com/article.php?article_id=15

    They should get you on your way, it is very simple to do. You just have to think about where data is going. If you have any winsock problems please post i'd be happy to help. That or any more questions.

    Pino

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Nov 2005
    Location
    Bentonville, AR
    Posts
    22

    Re: Client-server Application

    Thanks, This a a HUGE help,

    Again,

    Cory

  6. #6
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    Re: Client-server Application

    Np, i enjoy helping with this kind of stuff, please if you get stuck post back

    Pino

Posting Permissions

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



Click Here to Expand Forum to Full Width