/// <summary> /// Method for the clietns instances. /// Creates a Request instance to analyze the incoming data, a Response instance to create a valid answer to it and send it to the socket if required. /// </summary> void HandleDataInClient() { RequestInClient request = new RequestInClient(data, this); ResponseInClient response = new ResponseInClient(request, this); response.Post(); }
/// <summary> /// The class constructor. /// </summary> /// <param name="request">The analyzed data.</param> /// <param name="dataHandler">The DataHandler instance that created this instance.</param> public ResponseInClient(RequestInClient request, DataHandler dataHandler) { if (request.ResponseExpected) { this.request = request; this.dataHandler = dataHandler; ProcessData(request); } }
/// <summary> /// Creates a an answer based on the incoming request data. /// </summary> /// <param name="request"></param> void ProcessData(RequestInClient request) { switch (request.Type) { } }