LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Linux Socket Programming in C (https://www.linuxquestions.org/questions/programming-9/linux-socket-programming-in-c-696802/)

jackson.or 01-12-2009 02:05 PM

Linux Socket Programming in C
 
PLs!!!! Help



Online Banking which you can create an account and perform transactions. First the client program needs to connect to the bank's server . After
the connection is successfully established, the client asks the user to provide a user name and password. After this the user is allowed to perform transactions. The messages the client sends must include the user name and password, and the type of transaction. A single letter denotes the available transaction types: create "C", balance “B”, deposit “D”,
withdraw “W”, or quit “Q”. Deposits and withdrawals must, of course, specify the amount of money involved. After making transactions (as many as desired), the client disconnects from the server.

To create a new account, after connecting to the server, the client sends a “create” message with the format:
Username,Password,C

User names are not case sensitive. Passwords, of course, are case sensitive

If the requested user name is already in use, the server will reply:
Requested user name already in use – try again

If there is anything else wrong with the transaction (e.g. bad format or missing password) the server will reply:
Request failed

jiml8 01-12-2009 02:19 PM

And your question is?

Do you want someone to write this for you? In C? I'll do it. My rate for a bank is $110 per hour.

wje_lq 01-12-2009 03:30 PM

Quote:

I'll do it.
Well said.

jackson.or, if you want to do it yourself and you can already program for Linux/UNIX in C, you should run (not walk) to your nearest bookseller and ask for a copy of UNIX Network Programming, written by W. Richard Stevens of happy memory and published by Addison Wesley.

Curl up on a rainy weekend and read about 2/3 of the book. Then crack your knuckles, get down to work, and post specific questions (extremely specific questions) here. We'll probably be more than happy to give 'em a go.

Hope this helps.

paulsm4 01-12-2009 04:10 PM

Hi -

This certainly looks like homework.

Please cut/paste the code you've tried (be sure to use code blocks) and please ask specific questions about what's not working.

Nobody on this forum will do your homework for you, but we'd all be glad to help you understand a problem you're having difficulty with.


All times are GMT -5. The time now is 08:28 PM.