From 556b38702a8586f7b3b0c381114b109bd24c9c70 Mon Sep 17 00:00:00 2001 From: geby Date: Mon, 4 Jan 2010 09:47:36 +0000 Subject: [PATCH] New TBlockSocket.Owner property. You know what protocol class own this socket now. git-svn-id: https://svn.code.sf.net/p/synalist/code/trunk@108 7c85be65-684b-0410-a082-b2ed4fbef004 --- blcksock.pas | 10 +++++++--- clamsend.pas | 8 +++++--- dnssend.pas | 8 +++++--- ftpsend.pas | 8 +++++--- ftptsend.pas | 7 ++++--- httpsend.pas | 7 ++++--- imapsend.pas | 7 ++++--- ldapsend.pas | 7 ++++--- nntpsend.pas | 7 ++++--- pingsend.pas | 7 ++++--- pop3send.pas | 7 ++++--- slogsend.pas | 7 ++++--- smtpsend.pas | 7 ++++--- snmpsend.pas | 7 ++++--- sntpsend.pas | 7 ++++--- tlntsend.pas | 7 ++++--- 16 files changed, 70 insertions(+), 48 deletions(-) diff --git a/blcksock.pas b/blcksock.pas index 3ac6b6a..150a459 100644 --- a/blcksock.pas +++ b/blcksock.pas @@ -1,9 +1,9 @@ {==============================================================================| -| Project : Ararat Synapse | 009.006.000 | +| Project : Ararat Synapse | 009.007.000 | |==============================================================================| | Content: Library base | |==============================================================================| -| Copyright (c)1999-2008, Lukas Gebauer | +| Copyright (c)1999-2010, Lukas Gebauer | | All rights reserved. | | | | Redistribution and use in source and binary forms, with or without | @@ -33,7 +33,7 @@ | DAMAGE. | |==============================================================================| | The Initial Developer of the Original Code is Lukas Gebauer (Czech Republic).| -| Portions created by Lukas Gebauer are Copyright (c)1999-2008. | +| Portions created by Lukas Gebauer are Copyright (c)1999-2010. | | All Rights Reserved. | |==============================================================================| | Contributor(s): | @@ -309,6 +309,7 @@ type FSocket: TSocket; FLastError: Integer; FLastErrorDesc: string; + FOwner: TObject; procedure SetDelayedOption(const Value: TSynaOption); procedure DelayedOption(const Value: TSynaOption); procedure ProcessDelayedOptions; @@ -821,6 +822,8 @@ type on real socket operations too! Note: Each heartbeat slowing socket processing.} property HeartbeatRate: integer read FHeartbeatRate Write FHeartbeatRate; + {:What class own this socket? Used by protocol implementation classes.} + property Owner: TObject read FOwner Write FOwner; end; {:@abstract(Support for SOCKS4 and SOCKS5 proxy) @@ -1457,6 +1460,7 @@ begin FStopFlag := False; FNonblockSendTimeout := 15000; FHeartbeatRate := 0; + FOwner := nil; {$IFNDEF ONCEWINSOCK} if Stub = '' then Stub := DLLStackName; diff --git a/clamsend.pas b/clamsend.pas index 91a9f56..d8fd952 100644 --- a/clamsend.pas +++ b/clamsend.pas @@ -1,9 +1,9 @@ {==============================================================================| -| Project : Ararat Synapse | 001.001.000 | +| Project : Ararat Synapse | 001.001.001 | |==============================================================================| | Content: ClamAV-daemon client | |==============================================================================| -| Copyright (c)2005-2009, Lukas Gebauer | +| Copyright (c)2005-2010, Lukas Gebauer | | All rights reserved. | | | | Redistribution and use in source and binary forms, with or without | @@ -33,7 +33,7 @@ | DAMAGE. | |==============================================================================| | The Initial Developer of the Original Code is Lukas Gebauer (Czech Republic).| -| Portions created by Lukas Gebauer are Copyright (c)2005-2009. | +| Portions created by Lukas Gebauer are Copyright (c)2005-2010. | | All Rights Reserved. | |==============================================================================| | Contributor(s): | @@ -121,7 +121,9 @@ constructor TClamSend.Create; begin inherited Create; FSock := TTCPBlockSocket.Create; + FSock.Owner := self; FDSock := TTCPBlockSocket.Create; + FDSock.Owner := self; FTimeout := 60000; FTargetPort := cClamProtocol; FSession := false; diff --git a/dnssend.pas b/dnssend.pas index f7684ce..948cb4c 100644 --- a/dnssend.pas +++ b/dnssend.pas @@ -1,9 +1,9 @@ {==============================================================================| -| Project : Ararat Synapse | 002.007.004 | +| Project : Ararat Synapse | 002.007.005 | |==============================================================================| | Content: DNS client | |==============================================================================| -| Copyright (c)1999-2007, Lukas Gebauer | +| Copyright (c)1999-2010, Lukas Gebauer | | All rights reserved. | | | | Redistribution and use in source and binary forms, with or without | @@ -33,7 +33,7 @@ | DAMAGE. | |==============================================================================| | The Initial Developer of the Original Code is Lukas Gebauer (Czech Republic).| -| Portions created by Lukas Gebauer are Copyright (c)2000-2007. | +| Portions created by Lukas Gebauer are Copyright (c)2000-2010. | | All Rights Reserved. | |==============================================================================| | Contributor(s): | @@ -212,7 +212,9 @@ constructor TDNSSend.Create; begin inherited Create; FSock := TUDPBlockSocket.Create; + FSock.Owner := self; FTCPSock := TTCPBlockSocket.Create; + FTCPSock.Owner := self; FUseTCP := False; FTimeout := 10000; FTargetPort := cDnsProtocol; diff --git a/ftpsend.pas b/ftpsend.pas index 49b2a00..c3470bb 100644 --- a/ftpsend.pas +++ b/ftpsend.pas @@ -1,9 +1,9 @@ {==============================================================================| -| Project : Ararat Synapse | 003.005.001 | +| Project : Ararat Synapse | 003.005.002 | |==============================================================================| | Content: FTP client | |==============================================================================| -| Copyright (c)1999-2008, Lukas Gebauer | +| Copyright (c)1999-2010, Lukas Gebauer | | All rights reserved. | | | | Redistribution and use in source and binary forms, with or without | @@ -33,7 +33,7 @@ | DAMAGE. | |==============================================================================| | The Initial Developer of the Original Code is Lukas Gebauer (Czech Republic).| -| Portions created by Lukas Gebauer are Copyright (c) 1999-2008. | +| Portions created by Lukas Gebauer are Copyright (c) 1999-2010. | | All Rights Reserved. | |==============================================================================| | Contributor(s): | @@ -465,8 +465,10 @@ begin FFullResult := TStringList.Create; FDataStream := TMemoryStream.Create; FSock := TTCPBlockSocket.Create; + FSock.Owner := self; FSock.ConvertLineEnd := True; FDSock := TTCPBlockSocket.Create; + FDSock.Owner := self; FFtpList := TFTPList.Create; FTimeout := 300000; FTargetPort := cFtpProtocol; diff --git a/ftptsend.pas b/ftptsend.pas index 9cf7bab..af102f3 100644 --- a/ftptsend.pas +++ b/ftptsend.pas @@ -1,9 +1,9 @@ {==============================================================================| -| Project : Ararat Synapse | 001.001.000 | +| Project : Ararat Synapse | 001.001.001 | |==============================================================================| | Content: Trivial FTP (TFTP) client and server | |==============================================================================| -| Copyright (c)1999-2004, Lukas Gebauer | +| Copyright (c)1999-2010, Lukas Gebauer | | All rights reserved. | | | | Redistribution and use in source and binary forms, with or without | @@ -33,7 +33,7 @@ | DAMAGE. | |==============================================================================| | The Initial Developer of the Original Code is Lukas Gebauer (Czech Republic).| -| Portions created by Lukas Gebauer are Copyright (c)2003-2004. | +| Portions created by Lukas Gebauer are Copyright (c)2003-2010. | | All Rights Reserved. | |==============================================================================| | Contributor(s): | @@ -134,6 +134,7 @@ constructor TTFTPSend.Create; begin inherited Create; FSock := TUDPBlockSocket.Create; + FSock.Owner := self; FTargetPort := cTFTPProtocol; FData := TMemoryStream.Create; FErrorCode := 0; diff --git a/httpsend.pas b/httpsend.pas index feef6b0..7d3d261 100644 --- a/httpsend.pas +++ b/httpsend.pas @@ -1,9 +1,9 @@ {==============================================================================| -| Project : Ararat Synapse | 003.012.002 | +| Project : Ararat Synapse | 003.012.003 | |==============================================================================| | Content: HTTP client | |==============================================================================| -| Copyright (c)1999-2008, Lukas Gebauer | +| Copyright (c)1999-2010, Lukas Gebauer | | All rights reserved. | | | | Redistribution and use in source and binary forms, with or without | @@ -33,7 +33,7 @@ | DAMAGE. | |==============================================================================| | The Initial Developer of the Original Code is Lukas Gebauer (Czech Republic).| -| Portions created by Lukas Gebauer are Copyright (c) 1999-2008. | +| Portions created by Lukas Gebauer are Copyright (c) 1999-2010. | | All Rights Reserved. | |==============================================================================| | Contributor(s): | @@ -264,6 +264,7 @@ begin FCookies := TStringList.Create; FDocument := TMemoryStream.Create; FSock := TTCPBlockSocket.Create; + FSock.Owner := self; FSock.ConvertLineEnd := True; FSock.SizeRecvBuffer := c64k; FSock.SizeSendBuffer := c64k; diff --git a/imapsend.pas b/imapsend.pas index 1e91b08..3325cc6 100644 --- a/imapsend.pas +++ b/imapsend.pas @@ -1,9 +1,9 @@ {==============================================================================| -| Project : Ararat Synapse | 002.005.001 | +| Project : Ararat Synapse | 002.005.002 | |==============================================================================| | Content: IMAP4rev1 client | |==============================================================================| -| Copyright (c)1999-2004, Lukas Gebauer | +| Copyright (c)1999-2010, Lukas Gebauer | | All rights reserved. | | | | Redistribution and use in source and binary forms, with or without | @@ -33,7 +33,7 @@ | DAMAGE. | |==============================================================================| | The Initial Developer of the Original Code is Lukas Gebauer (Czech Republic).| -| Portions created by Lukas Gebauer are Copyright (c)2001-2004. | +| Portions created by Lukas Gebauer are Copyright (c)2001-2010. | | All Rights Reserved. | |==============================================================================| | Contributor(s): | @@ -269,6 +269,7 @@ begin FFullResult := TStringList.Create; FIMAPcap := TStringList.Create; FSock := TTCPBlockSocket.Create; + FSock.Owner := self; FSock.ConvertLineEnd := True; FSock.SizeRecvBuffer := 32768; FSock.SizeSendBuffer := 32768; diff --git a/ldapsend.pas b/ldapsend.pas index 1067d4a..f91ccdb 100644 --- a/ldapsend.pas +++ b/ldapsend.pas @@ -1,9 +1,9 @@ {==============================================================================| -| Project : Ararat Synapse | 001.006.001 | +| Project : Ararat Synapse | 001.006.002 | |==============================================================================| | Content: LDAP client | |==============================================================================| -| Copyright (c)1999-2009, Lukas Gebauer | +| Copyright (c)1999-2010, Lukas Gebauer | | All rights reserved. | | | | Redistribution and use in source and binary forms, with or without | @@ -33,7 +33,7 @@ | DAMAGE. | |==============================================================================| | The Initial Developer of the Original Code is Lukas Gebauer (Czech Republic).| -| Portions created by Lukas Gebauer are Copyright (c)2003-2009. | +| Portions created by Lukas Gebauer are Copyright (c)2003-2010. | | All Rights Reserved. | |==============================================================================| | Contributor(s): | @@ -499,6 +499,7 @@ begin FReferals := TStringList.Create; FFullResult := ''; FSock := TTCPBlockSocket.Create; + FSock.Owner := self; FTimeout := 60000; FTargetPort := cLDAPProtocol; FAutoTLS := False; diff --git a/nntpsend.pas b/nntpsend.pas index ef35f77..e14b839 100644 --- a/nntpsend.pas +++ b/nntpsend.pas @@ -1,9 +1,9 @@ {==============================================================================| -| Project : Ararat Synapse | 001.005.001 | +| Project : Ararat Synapse | 001.005.002 | |==============================================================================| | Content: NNTP client | |==============================================================================| -| Copyright (c)1999-2007, Lukas Gebauer | +| Copyright (c)1999-2010, Lukas Gebauer | | All rights reserved. | | | | Redistribution and use in source and binary forms, with or without | @@ -33,7 +33,7 @@ | DAMAGE. | |==============================================================================| | The Initial Developer of the Original Code is Lukas Gebauer (Czech Republic).| -| Portions created by Lukas Gebauer are Copyright (c) 1999-2007. | +| Portions created by Lukas Gebauer are Copyright (c) 1999-2010. | | All Rights Reserved. | |==============================================================================| | Contributor(s): | @@ -195,6 +195,7 @@ constructor TNNTPSend.Create; begin inherited Create; FSock := TTCPBlockSocket.Create; + FSock.Owner := self; FData := TStringList.Create; FDataToSend := TStringList.Create; FNNTPcap := TStringList.Create; diff --git a/pingsend.pas b/pingsend.pas index ddab79e..8e68a7b 100644 --- a/pingsend.pas +++ b/pingsend.pas @@ -1,9 +1,9 @@ {==============================================================================| -| Project : Ararat Synapse | 004.000.000 | +| Project : Ararat Synapse | 004.000.001 | |==============================================================================| | Content: PING sender | |==============================================================================| -| Copyright (c)1999-2007, Lukas Gebauer | +| Copyright (c)1999-2010, Lukas Gebauer | | All rights reserved. | | | | Redistribution and use in source and binary forms, with or without | @@ -33,7 +33,7 @@ | DAMAGE. | |==============================================================================| | The Initial Developer of the Original Code is Lukas Gebauer (Czech Republic).| -| Portions created by Lukas Gebauer are Copyright (c)2000-2007. | +| Portions created by Lukas Gebauer are Copyright (c)2000-2010. | | All Rights Reserved. | |==============================================================================| | Contributor(s): | @@ -264,6 +264,7 @@ constructor TPINGSend.Create; begin inherited Create; FSock := TICMPBlockSocket.Create; + FSock.Owner := self; FTimeout := 5000; FPacketSize := 32; FSeq := 0; diff --git a/pop3send.pas b/pop3send.pas index a261c56..c53ed80 100644 --- a/pop3send.pas +++ b/pop3send.pas @@ -1,9 +1,9 @@ {==============================================================================| -| Project : Ararat Synapse | 002.006.000 | +| Project : Ararat Synapse | 002.006.001 | |==============================================================================| | Content: POP3 client | |==============================================================================| -| Copyright (c)1999-2007, Lukas Gebauer | +| Copyright (c)1999-2010, Lukas Gebauer | | All rights reserved. | | | | Redistribution and use in source and binary forms, with or without | @@ -33,7 +33,7 @@ | DAMAGE. | |==============================================================================| | The Initial Developer of the Original Code is Lukas Gebauer (Czech Republic).| -| Portions created by Lukas Gebauer are Copyright (c)2001-2007. | +| Portions created by Lukas Gebauer are Copyright (c)2001-2010. | | All Rights Reserved. | |==============================================================================| | Contributor(s): | @@ -203,6 +203,7 @@ begin FFullResult := TStringList.Create; FPOP3cap := TStringList.Create; FSock := TTCPBlockSocket.Create; + FSock.Owner := self; FSock.ConvertLineEnd := true; FTimeout := 60000; FTargetPort := cPop3Protocol; diff --git a/slogsend.pas b/slogsend.pas index 9c0625d..900f6c0 100644 --- a/slogsend.pas +++ b/slogsend.pas @@ -1,9 +1,9 @@ {==============================================================================| -| Project : Ararat Synapse | 001.002.002 | +| Project : Ararat Synapse | 001.002.003 | |==============================================================================| | Content: SysLog client | |==============================================================================| -| Copyright (c)1999-2003, Lukas Gebauer | +| Copyright (c)1999-2010, Lukas Gebauer | | All rights reserved. | | | | Redistribution and use in source and binary forms, with or without | @@ -33,7 +33,7 @@ | DAMAGE. | |==============================================================================| | The Initial Developer of the Original Code is Lukas Gebauer (Czech Republic).| -| Portions created by Lukas Gebauer are Copyright (c)2001-2003. | +| Portions created by Lukas Gebauer are Copyright (c)2001-2010. | | All Rights Reserved. | |==============================================================================| | Contributor(s): | @@ -264,6 +264,7 @@ constructor TSyslogSend.Create; begin inherited Create; FSock := TUDPBlockSocket.Create; + FSock.Owner := self; FSysLogMessage := TSysLogMessage.Create; FTargetPort := cSysLogProtocol; end; diff --git a/smtpsend.pas b/smtpsend.pas index f597ef9..f8a6c7b 100644 --- a/smtpsend.pas +++ b/smtpsend.pas @@ -1,9 +1,9 @@ {==============================================================================| -| Project : Ararat Synapse | 003.005.000 | +| Project : Ararat Synapse | 003.005.001 | |==============================================================================| | Content: SMTP client | |==============================================================================| -| Copyright (c)1999-2009, Lukas Gebauer | +| Copyright (c)1999-2010, Lukas Gebauer | | All rights reserved. | | | | Redistribution and use in source and binary forms, with or without | @@ -33,7 +33,7 @@ | DAMAGE. | |==============================================================================| | The Initial Developer of the Original Code is Lukas Gebauer (Czech Republic).| -| Portions created by Lukas Gebauer are Copyright (c) 1999-2009. | +| Portions created by Lukas Gebauer are Copyright (c) 1999-2010. | | All Rights Reserved. | |==============================================================================| | Contributor(s): | @@ -261,6 +261,7 @@ begin FFullResult := TStringList.Create; FESMTPcap := TStringList.Create; FSock := TTCPBlockSocket.Create; + FSock.Owner := self; FSock.ConvertLineEnd := true; FTimeout := 60000; FTargetPort := cSmtpProtocol; diff --git a/snmpsend.pas b/snmpsend.pas index d8909cf..b653fe4 100644 --- a/snmpsend.pas +++ b/snmpsend.pas @@ -1,9 +1,9 @@ {==============================================================================| -| Project : Ararat Synapse | 003.000.009 | +| Project : Ararat Synapse | 003.000.010 | |==============================================================================| | Content: SNMP client | |==============================================================================| -| Copyright (c)1999-2007, Lukas Gebauer | +| Copyright (c)1999-2010, Lukas Gebauer | | All rights reserved. | | | | Redistribution and use in source and binary forms, with or without | @@ -33,7 +33,7 @@ | DAMAGE. | |==============================================================================| | The Initial Developer of the Original Code is Lukas Gebauer (Czech Republic).| -| Portions created by Lukas Gebauer are Copyright (c)2000-2007. | +| Portions created by Lukas Gebauer are Copyright (c)2000-2010. | | All Rights Reserved. | |==============================================================================| | Contributor(s): | @@ -771,6 +771,7 @@ begin FQuery.Clear; FReply.Clear; FSock := TUDPBlockSocket.Create; + FSock.Owner := self; FTimeout := 5000; FTargetPort := cSnmpProtocol; FHostIP := ''; diff --git a/sntpsend.pas b/sntpsend.pas index c4958b2..3316eba 100644 --- a/sntpsend.pas +++ b/sntpsend.pas @@ -1,9 +1,9 @@ {==============================================================================| -| Project : Ararat Synapse | 003.000.002 | +| Project : Ararat Synapse | 003.000.003 | |==============================================================================| | Content: SNTP client | |==============================================================================| -| Copyright (c)1999-2007, Lukas Gebauer | +| Copyright (c)1999-2010, Lukas Gebauer | | All rights reserved. | | | | Redistribution and use in source and binary forms, with or without | @@ -33,7 +33,7 @@ | DAMAGE. | |==============================================================================| | The Initial Developer of the Original Code is Lukas Gebauer (Czech Republic).| -| Portions created by Lukas Gebauer are Copyright (c)2000-2007. | +| Portions created by Lukas Gebauer are Copyright (c)2000-2010. | | All Rights Reserved. | |==============================================================================| | Contributor(s): | @@ -162,6 +162,7 @@ constructor TSNTPSend.Create; begin inherited Create; FSock := TUDPBlockSocket.Create; + FSock.Owner := self; FTimeout := 5000; FTargetPort := cNtpProtocol; FMaxSyncDiff := 3600; diff --git a/tlntsend.pas b/tlntsend.pas index 0fdb9e0..157f049 100644 --- a/tlntsend.pas +++ b/tlntsend.pas @@ -1,9 +1,9 @@ {==============================================================================| -| Project : Ararat Synapse | 001.003.000 | +| Project : Ararat Synapse | 001.003.001 | |==============================================================================| | Content: TELNET and SSH2 client | |==============================================================================| -| Copyright (c)1999-2008, Lukas Gebauer | +| Copyright (c)1999-2010, Lukas Gebauer | | All rights reserved. | | | | Redistribution and use in source and binary forms, with or without | @@ -33,7 +33,7 @@ | DAMAGE. | |==============================================================================| | The Initial Developer of the Original Code is Lukas Gebauer (Czech Republic).| -| Portions created by Lukas Gebauer are Copyright (c)2002-2008. | +| Portions created by Lukas Gebauer are Copyright (c)2002-2010. | | All Rights Reserved. | |==============================================================================| | Contributor(s): | @@ -148,6 +148,7 @@ constructor TTelnetSend.Create; begin inherited Create; FSock := TTCPBlockSocket.Create; + FSock.Owner := self; FSock.OnReadFilter := FilterHook; FTimeout := 60000; FTargetPort := cTelnetProtocol;