Results 1 to 3 of 3

Thread: Q: sending images over a network?

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2005
    Posts
    1

    Exclamation Q: sending images over a network?

    I am working on a program about motion detection that a server side appl captures images when motion detected then it sends these pictures to a client appl.. I know that Winsocket is used for sending text but I dont know how to send images over the net!

    c++ code if possible

  2. #2
    Lively Member
    Join Date
    May 2005
    Posts
    90

    Re: Q: sending images over a network?

    It's not going to be much different from sending text. Just send the actual file data instead. Remember, you may need to send a length notification so that the client knows when it's received all the file.
    ^_^

  3. #3
    New Member
    Join Date
    Sep 2005
    Posts
    14

    Re: Q: sending images over a network?

    you need to break up the file, then send segments, recompile them at the other end, pretty easy.

    just open the picture for binary, and make a loop 1 to lof(filenumber) divide it into 1 kb segments, add a header and footer for each segment, an overall checksum and length.

    Client>Serv "About to send file"
    Serv>Client "Start Sending"
    Client>Serv "Length, Checksum"
    Client>Serv "BOF"
    Client>Serv "SegmentNumber,HeaderData),length"
    Serv>Client "Confirm SegmentnumberX, SegmentX Length"
    If it doesnt match the buffer, resend
    loop till end
    Client>Serv "EOF"
    Serv>Client "File Checksum Ok, Length Ok"

    End communication

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