samedi 23 juillet 2016

Client asking server for file content in C using sockets

I'm new at socket programming and I want to create simple a login/authentication client server program in C language where the client asks for a file content. I've learned the basic of socket programming but I still dont find any valuable information to help me to create the program like this:

1.Client sends to server the name and an file's URI.

2.The server asks the database if this name exists.

  1. If the client is authenticated the server sends to the client the content of the file.

I have to use ask_database(char *host, char *name, int *response) function. Can someone helps me with some manuals or something else to read to undersatand how to create this program or with a simple solution for this program. I know that there are many tutorials online but I didnt find something to understand how to make the authentication of a client. Thanks!

Aucun commentaire:

Enregistrer un commentaire