有啥BUG,問題請發送email至[email protected] ,謝謝。:D
代碼
1 #define Sleep
2 //#undef Sleep
3 //#define TransmitLog
4 #undef TransmitLog
5 //#define BreakpointLog
6 #undef BreakpointLog
7 using System;
8 using System.Net;
9 using System.Net.Sockets;
10 using System.IO;
11 using System.Text;
12 using System.Threading;
13 using System.Collections.Generic;
14 using System.Diagnostics;
15
16 namespace Rocky
17 {
18 public static class FileTransmiter
19 {
20 #region NestedType
21 private class SendWorker : IWorker
22 {
23 private long totalSent, totalSend;
24 private byte[] buffer;
25 private Socket sock;
26 private FileStream reader;
27 private Thread thread;
28 private bool isFinished;
29
30 public long TotalSent
31 {
32 get { return totalSent; }
33 }
34 public long TotalSend
35 {
36 get { return totalSend; }
37 }
38 public byte[] Buffer
39 {
40 get { return buffer; }