HTML and CSS Reference
In-Depth Information
10. With these classes implemented you can now implement the main Program class.
Add the following code to the Main() method:
// Create the WsServer, specifying the server's address
WsServer server=new WsServer(8300);
// Start the server
// Keep running until the Enter key is pressed
string input=Console.ReadLine();
This code creates the WsServer class and calls the StartSocketServer() method. It calls the
Console.ReadLine() method, which will wait until the Enter key is pressed.
Creating a Web Application
With a basic server implementation you're now ready to create a web application that will use it. You will create a
project using the Basic MVC4 template that you used in previous chapters. You will later modify this application
to use it as the client web page.
eXerCISe 13-2. CreatING a SIMpLe CLIeNt
In the Solution Explorer, right-click the Chapter 13 solution and then select the
Add ➤ New project links.
In the Add New project dialog box, select the “ASp.NET MVC4 Web Application”
template. Enter the project name Client as shown in Figure 13-5 .
Figure 13-5. Creating the Client project
Search WWH ::

Custom Search