dont know were to start

This is a discussion on dont know were to start within the C Programming forums, part of the General Programming Boards category; hi im currently trying to write a small program for my final project about networks but i really dont know ...

  1. #1
    Registered User
    Join Date
    Nov 2006
    Posts
    38

    Lightbulb dont know were to start

    hi im currently trying to write a small program for my final project about networks but i really dont know were to start on it

    this is what im tring to do

    im using c to make a server send and display an image on one of 10 client pc's then with some small input from one or more of those clients the server will change the image displayed on the clients

    hope some one can point me in teh right direction

    p.s im using both visual basic on windows and Blue fish on linux

  2. #2
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,474
    You should decide how your client will connect to the server:
    sockets, named pipes, other - this should be a first decision I think
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  3. #3
    Registered User
    Join Date
    Nov 2006
    Posts
    38

    Question

    yeah its based on sockets and the images are saved on both client and servers

  4. #4
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,474
    Then you sould start with creating small application - that just opens some socket for listening and prints messages about any socket event - especially CONNECT

    And test it with your client (Is it already ready?)

    When your application will work - you will accept the connection and try to send a file on the accepted fd to the client

    When it will work - you will add the latest functionality - wait for additional request from client and send back another picture on request.

    (I hope you already know how to open a file in binary mode and read its contents into memory)
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  5. #5
    uint64_t...think positive xuftugulus's Avatar
    Join Date
    Feb 2008
    Location
    Pacem
    Posts
    355
    Quote Originally Posted by kaijuu View Post
    yeah its based on sockets and the images are saved on both client and servers
    Try searching for "sockets client server sample code". On my first assignment on network sockets i survived just with the man pages, but some small snippets out there are best to point out the socket way of life...
    Code:
    ...
        goto johny_walker_red_label;
    johny_walker_blue_label: exit(-149$);
    johny_walker_red_label : exit( -22$);
    A typical example of ...cheap programming practices.

  6. #6
    Registered User
    Join Date
    Nov 2006
    Posts
    38
    just to clerify when you change a image to binary you read it to c like a txt document and send that over the socket

    so how would i change it back from binary at the other end and display it on screen

    also can a simple sockets program handle 10 clients and would i just do a ten client connection loop

    any ideas

  7. #7
    Registered User
    Join Date
    Nov 2006
    Posts
    38
    just another thought

    could i save the image on to the client computer and say, send a short string to the client and when it recives this string it displays the image that is stored in its memory

    not sure if this is possible as im still quite new to c

  8. #8
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Yes, you could do that.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Data Structure Eror
    By prominababy in forum C Programming
    Replies: 3
    Last Post: 01-06-2009, 08:35 AM
  2. Adventures in labyrinth generation.
    By guesst in forum Game Programming
    Replies: 8
    Last Post: 10-12-2008, 01:30 PM
  3. C++ gui for windows where to start
    By prixone in forum Windows Programming
    Replies: 2
    Last Post: 12-16-2006, 10:48 PM
  4. GNOME Desktop won't start (Mandriva)
    By psychopath in forum Tech Board
    Replies: 10
    Last Post: 07-19-2006, 01:21 PM
  5. Start bar color in WinXP
    By confuted in forum Tech Board
    Replies: 4
    Last Post: 05-03-2003, 06:18 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21