资 源 简 介
Coffee Pot Server
Many people around the world are trying to utilise the World Wide Web more effectively. What we have here is a .Net library for a server that can be used to control a virtual coffee pot senario. This could of course be used to create code that interacts with an actual coffeepot!
An example server is also included in the repository.
Usage
To use a the library you need to add this to the top of your code:
using CoffeePotServer;
To create a coffee pot server:
HTCPCP myHTCPCPServer = new HTCPCPServer(port);
It is recommended to use port 80 as most firewalls will accept requests in the format of HTCPCP as it is very similar to HTTP.
To add pots to the server use:
myHTCPCPServer.AddPot(potNumber);
To start accepting clients, I would suggest starting a thread as such:
new Thread(myHTCPCPServer.StartListening).Start();
Happy Brewing!