How do I pass a file to post instead of message

The url i am posting is IP:PORT/app/server/recieve. How do I pass /app/server/recieve in the following program?


struct sockaddr_in {
(short int sin_family; unsigned short int sin_port; struct in_addr sin_addr; unsigned char sin_zero[8];
}

struct sockaddr_in their addr;
their_addr.sin_family=AF_INET;
their_addr.sin_prot = htons(PORT);
their_addr.sin_addr=*((struct in_addr *)he->h_addr);
....
...
send(new_fd, /usr/local/hello.xml, 14,0)...

I cud not clearly understand your question.
Are u trying to send the string "/app/server/receive" to the other end??
If that is the case, if u just want to pass a message to the other end, you can store the string in a character array and use the send procedure
send(<socket descriptor>,<arr name>,<sizeof(arr)>,0);
This will send the string to the other end.
If this is not what you r looking at, can u please expalin the problem a little bit more clearly

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.