The assignment is to develop a three-tier system that simulates a guessing game. The system consists of a client, middleware, and server. In the first stage (40-50%), the message passing from clients to middleware, then to server, back to middleware, and finally back to the correct client must be accomplished by the due date.
Contribute Materials
Your contribution can guide someone’s learning journey. Share your
documents today.
Stage One: You will be expected to submit a CD on Friday 25th November 2016 at the lecture. There should be three projects present on the CD – Client (two to run in demo), Middleware and Server (details below). Assignment To develop a three tier system that will simulate a guessing game. Stage One: (to get a basic pass) will expect the passing of a message from the clients to the middleware, to the server, back to the middleware and then back to the correct client. This is the basic framework for the coursework. Stage One 40-50% -> by the due date to have accomplished message passing from both clients – middleware – server – middleware – appropriate client. The Server: usingSystem; usingSystem.Collections.Generic; usingSystem.Linq; usingSystem.Text; usingSystem.Net; usingSystem.Net.Sockets; namespaceConsoleApplication2 { classProgram { staticvoidMain(string[] args) { Socketsck=newSocket(AddressFamily.InterNetwork, SocketType.Stream,ProtocolType.Tcp); sck.Bind(newIPEndPoint(0, 1994)); sck.Listen(0); Socketacc= sck.Accept(); Console.WriteLine("Connectionhas been made tothe server from the Client"); byte[] buffer =Encoding.Default.GetBytes("Hello sentfromServer to Client"); acc.Send(buffer,0, buffer.Length,SocketFlags.None); byte[] recbuffer =newbyte[255]; intrec= acc.Receive(recbuffer,0, recbuffer.Length, 0); Array.Resize(refrecbuffer,rec); Console.WriteLine("received from client the string: {0}", Encoding.Default.GetString(recbuffer));
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.