摘要:
断点续传的原理 在了解HTTP断点续传的原理之前,先来说说HTTP协议,HTTP协议是一种基于tcp的简单协议,分为请求和回复两种。请求协议是由客户机(浏览器)向服务器(WEB SERVER)提交请求时发送报文的协议。回复协议是由服务器(web server),向客户机(浏览器)回复报文时的协议。请求和回复协议都由头和体组成。头和体之间以一行空行为分隔。 以下是一个请求报文与相应的回复报文的例子... 阅读全文
摘要:
using System;using System.Collections.Generic;using System.Text;using System.DirectoryServices;using System.Text.RegularExpressions;using System.Collections;namespace IISControlService{ /**//// ... 阅读全文
摘要:
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.IO;namespace U盘更新{ public ... 阅读全文
摘要:
using System;using System.Management;using System.Runtime;using System.Runtime.InteropServices;using System.Text;namespace TSConsoleApplication{ /**/ /// /// VS2005专业教程网收集整理,http://www.vs20... 阅读全文
摘要:
using System;using System.Data;using System.DirectoryServices;using System.Collections;using System.IO;namespace IISControl{ /**//// /// CreateWebDir 的摘要说明。 /// public class IISManager ... 阅读全文
摘要:
方法一: /// /// 从这里开始运行 /// [STAThread]static void Main(){ Process instance = RunningInstance(); if (instance == null) { //没有实例在运行 WeatherApp appInstance = new WeatherApp(); ... 阅读全文
摘要:
单个写入程序/多个阅读程序在.Net类库中其实已经提供了实现,即System.Threading.ReaderWriterLock类。本文通过对常见的单个写入/多个阅读程序的分析来探索c#的多线程编程。 问题的提出 所谓单个写入程序/多个阅读程序的线程同步问题,是指任意数量的线程访问共享资源时,写入程序(线程)需要修改共享资源,而阅读程序(线程)需要读取数据。在这个同步问题中,很容易得到下面二... 阅读全文
摘要:
原文及源代码位置:http://bbs.msproject.cn/default.aspx?g=posts&t=333原文作者:ivanx转载自:http://bbs.msproject.cn/[翻译]Tapan Dantre.著Serial Communication using C# and Whidbey[简介]本文将介绍如何在.NET平台下使用C#创建串口通信程序,.NET 2.0提供了串... 阅读全文
摘要:
上面介绍了通讯的基类,下面就是使用那个类进行发送和接收的部分: 二、发送部分: 发送咱们使用了多线程,可以同时进行多个任务,比如发送文件、发送文本等,互不影响: 发送文本方法: private void StartSendText(string strHost,int iPort,string strInfo) { SendText stText = new SendText(strHost,iP... 阅读全文
摘要:
最近一个项目要用到点对点文件传输,俺就到处找资料写程序,最后终于完成了,为了让别人少走些弯路,俺决定将俺程序中最重要的部分贡献出来,希望对大家有所帮助。 俺的程序分三部分,包括发送部分、接受部分和一个两者共享的通讯基类,这个基类才是俺心血的结晶:) 一、通讯基类 using System; using System.Net.Sockets; using System.Net ; using Sys... 阅读全文