socket problem - Help

This is a discussion on socket problem - Help ; Hey everyone, I am doing an image server project under linux. The image format is *ppm(Portable Pixel map). When client request a image to server, server store a iamge into a data structure ,called pixarray. The pixarray contains entire image ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: socket problem

  1. socket problem

    Hey everyone,

    I am doing an image server project under linux. The image format is
    *ppm(Portable Pixel map). When client request a image to server,
    server store a iamge into a data structure ,called pixarray. The
    pixarray contains entire image info. How can I write it to socket and
    client read it from socket by using write() and read()? Because I
    could only handle text under the argument of socket functions read(int
    client_sock,char* text, int size) and write(int server_sock,char*
    text, int size).

    Thanks,

    --Charles

  2. Re: socket problem

    man socket

    Only kidding! Probably the best guide to this is Beej's guide to network
    programming.

    http://www.ecst.csuchico.edu/~beej/guide/net/html/

    Chris

    Charles wrote:
    > Hey everyone,
    >
    > I am doing an image server project under linux. The image format is
    > *ppm(Portable Pixel map). When client request a image to server,
    > server store a iamge into a data structure ,called pixarray. The
    > pixarray contains entire image info. How can I write it to socket and
    > client read it from socket by using write() and read()? Because I
    > could only handle text under the argument of socket functions read(int
    > client_sock,char* text, int size) and write(int server_sock,char*
    > text, int size).
    >
    > Thanks,
    >
    > --Charles



+ Reply to Thread