Ignore:
Timestamp:
Feb 8, 2011, 11:02:02 AM (13 years ago)
Author:
george
Message:
Location:
PinConnection
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • PinConnection

    • Property svn:ignore
      •  

        old new  
        11lib
         2backup
  • PinConnection/UCommSocket.pas

    r129 r163  
    66
    77uses
    8   Classes, SysUtils, blcksock, UCommPin, UCommon;
     8  Classes, SysUtils, blcksock, UCommPin, UCommon, UMicroThreading,
     9  DateUtils;
    910
    1011type
     
    1516  { TCommSocketReceiveThread }
    1617
    17   TCommSocketReceiveThread = class(TThread)
     18  TCommSocketReceiveThread = class(TMicroThread)
    1819  public
    1920    Parent: TCommSocket;
     
    9394  InBufferUsed := 0;
    9495  with Parent do repeat
    95     try
    96       if InBufferUsed = 0 then Sleep(1);
     96      if InBufferUsed = 0 then MTSleep(1 * OneMillisecond)
     97        else Yield;
    9798      if Assigned(Socket) then
    9899      with Socket do
    99       if CanRead(100) then begin
     100      if CanRead(0) then begin
    100101        InBufferUsed := WaitingData;
    101102        if InBufferUsed > 0 then begin
     
    109110        end else InBufferUsed := 0;
    110111      end else InBufferUsed := 0;
    111     except
    112       on E: Exception do
    113         if Assigned(ExceptionHandler) then ExceptionHandler(Self, E);
    114     end;
    115112  until Terminated;
    116113end;
Note: See TracChangeset for help on using the changeset viewer.