using 3 sockets with files
We will create 3 sockets two Servers and one Client : ServerA and ServerB and Client
My Problem is that I don't know how to use files in sockets and perl and also I don't know how to create a communication between 3 Sockets
I know only with Client/Server
Is there anyone who can help me in doing this.
This is the Instructions :
The Client will send the string containing his name and his credit card number (Exemple : "Carl, 5321456855741") and wait.
This String will be sent to ServerA with a communication protocol between Client and ServerA.
Then ServerA will modify the information and make it in this form "Carl-5321456855741" then send it to ServerB.
ServerB will verify if the informtion is correct or not by searching in a text file (created already and contain a list of names and Credit card numbers in this
form "Name-CardNumber-Amount" in each line) :
*) If it's correct (existing in the text file) ServerB will reply "Welcome $Name you have $Amount in your account" to ServerA and ServerA will send the
same message received from ServerB to Client.
*) If it's not correct (not existing in the text file) ServerB will reply "Sorry your informations is incorrect" to ServerA and ServerA will send the
same message received from ServerB to Client.