本文整理汇总了C#中HttpRequest.Read方法的典型用法代码示例。如果您正苦于以下问题:C# HttpRequest.Read方法的具体用法?C# HttpRequest.Read怎么用?C# HttpRequest.Read使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HttpRequest
的用法示例。
在下文中一共展示了HttpRequest.Read方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HttpTransaction
public HttpTransaction(HttpServer server, Socket socket, HttpConnectionCallback callback, bool closeOnEnd = false)
{
Server = server;
Socket = socket;
this.closeOnEnd = closeOnEnd;
ConnectionCallback = callback;
gc_handle = GCHandle.Alloc (this);
Request = new HttpRequest (this, socket);
Request.Read (Close);
}
示例2: HttpTransaction
public HttpTransaction(HttpServer server, SocketStream stream, HttpConnectionCallback callback)
{
Server = server;
Stream = stream;
ConnectionCallback = callback;
gc_handle = GCHandle.Alloc (this);
Stream.Closed += delegate (object sender, EventArgs args) {
Close ();
};
Request = new HttpRequest (this, stream);
Request.Read ();
}