Changeset 440 for PinConnection/UCommTCPServer.pas
- Timestamp:
- Nov 19, 2012, 2:43:40 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
PinConnection/UCommTCPServer.pas
r413 r440 7 7 uses 8 8 Classes, SysUtils, blcksock, synsock, UCommPin, UCommon, UThreading, 9 DateUtils, SpecializedList , tlntsend;9 DateUtils, SpecializedList; 10 10 11 11 type … … 48 48 FOnConnect: TSocketConnectEvent; 49 49 FOnDisconnect: TSocketConnectEvent; 50 FOnReceiveData: TReceiveDataEvent;50 //FOnReceiveData: TReceiveDataEvent; 51 51 FReceiveThread: TCommSocketReceiveThread; 52 procedure SetActive(const AValue: Boolean); 52 protected 53 procedure SetActive(const AValue: Boolean); override; 53 54 public 54 55 Sessions: TListObject; // TListObject<TCommTCPServerSession> … … 74 75 Mem := TMemoryStream.Create; 75 76 Stream.WriteToStream(Mem); 77 Mem.Position := 0; 76 78 Socket.SendStreamRaw(Mem); 77 79 finally … … 172 174 if AValue then begin 173 175 Socket.Bind(Address, IntToStr(Port)); 174 if Socket.LastError <> 0 then raise Exception.Create('Bind error' );176 if Socket.LastError <> 0 then raise Exception.Create('Bind error' + Socket.GetErrorDesc(Socket.LastError)); 175 177 Socket.Listen; 176 178 if Socket.LastError <> 0 then raise Exception.Create('Listen error');
Note:
See TracChangeset
for help on using the changeset viewer.