Re: [Synalist] using sendstring vs sendstreamraw for text files

2024-04-15 Thread Lukas Gebauer


Sendstream(raw) is just loop (symbolic code):

repeat
read buffer from the stream
sendstring(buffer)
until not eof

BTW: opposite function to sendstream is not recvpacket in case of 
TCP. RecvPacket just read what is in the systrm buffers now. It can 
be something different then what is sended by one SendString call. 
(It is very common error.)

Lukas

> 
> 
> background:
> 
> i made a simple tcp/ssl send/receive client/server using fpc/synapse
> 
> i started off using sendstring/recvpacket for sending stuff but while it 
> works okay for simple typing text and text files and fpc runcommand results 
> it gave bad 'binary' files (tgz png pdf etc)
> 
> so since going through
> http://synapse.ararat.cz/doc/help/blcksock.TBlockSocket.html
> was a bit overkill for information to use to figure out what to use
> 
> so looking around for a solution and finding
> https://forum.lazarus.freepascal.org/index.php?topic=31488.0
> https://stackoverflow.com/questions/30778703/lazarus-freepascal-synapse-send-file-to-tcpblocksocket
> 
> so now i use sendstreamraw(fs); // tstreamemory  for sending 'binary' files
> and everything is fine
> 
> ---
> 
> my question:
> 
> since the most common use of the program will be sending text files and using 
> the sendstreamraw method with tfilestream works just as well as sendstring 
> (from working vs not working viewpoint only) and thinking on simplifying the 
> code to just use sendstreamraw for sending text files (treating all files as 
> a single class of files rather then as text vs binary)
> 
> is creating the tfilestream then using sendstreamraw
> fs := tfilestream.create(s, fmOpenRead);
> a more or less efficient method then just reading the file into a variable 
> and then using sendstring
> 
> any information on limitations/benefits/synapse internals/fpc compiler 
> internals/timing  etc of using the sendstreamraw vs sendstring methods would 
> be appreciated
> 
> ---
> 
> 
> ___
> synalist-public mailing list
> synalist-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/synalist-public



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
https://www.geoget.cz/ - Geocaching solution



___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


[Synalist] new GitHub repository

2024-01-23 Thread Lukas Gebauer
Hi all,

official Synapse library source repository was moved to GitHub. See 
the:

https://github.com/geby/synapse



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
https://www.geoget.cz/ - Geocaching solution



___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


[Synalist] Move from Sourceforge to Github?

2023-12-20 Thread Lukas Gebauer


I have a long time idea... what about to change official Synapse's 
repository to GitHub?




-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
https://www.geoget.cz/ - Geocaching solution



___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] Synapse 40

2023-06-06 Thread Lukas Gebauer


1. Synapse 40 is outdated, allways use must current code from the SVN 
repository instead.

2. error code is: "SSL/TLS support is not compiled!" 
You must add one of SSL plugin unit into your project first. It 
connect Synapse to your favourite crypto libraries. However I not 
know what libraries are available on your platform.

> I'm trying to send an Email on my Raspberry PI 4 but I get the following 
> error when I try to send an Email
> It fails at blcksock.TTCPBlockSocket.SSLDoConnect which seems to call 
> TCustomSSL.Connect  
> 
> IError: -2,SSL/TLS support is not compiled!
> EXCEPTION: Synapse TCP/IP Socket error -2: SSL/TLS support is not compiled!


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
https://www.geoget.cz/ - Geocaching solution



___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] OpenSSL 3.0.7 or 1.1.1s does not work

2022-12-22 Thread Lukas Gebauer


Dne 22.12.2022 v 10:56 Petr Kolář napsal(a):

I use OpenSSL version 1.0.2n to send and receive emails.

I would like to use the latest version of OpenSSL, but when I tested 
version 3.0.7 or 1.1.1s I got an error in the TSSLOpenSSL.Init method


10091, detail: Network subsystem is unusable

I tried the binaries created by PIETTE 
http://wiki.overbyte.eu/wiki/index.php/ICS_Download


Does anyone have a working OpenSSL with the latest version of the 
libraries via Synapsi?


Which binaries have you tested as working? Or is it necessary to 
modify the Synapse code?




And previous 3.x or 1.1.x versions are working well?

Are you using right SSL plugin version?
ssl_openssl3 or ssl_openssl11 (old ssl_openssl plugin is deprecated now)

___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] understanding UDP sockets

2021-10-26 Thread Lukas Gebauer
> If I got you right, an open UPD Socket is always a server socket by default, 
> that accepts requests from any IP source address, as long as the PORT is 
> matching?
> 
> And I always have to filter the incoming datagrams with GetRemoteSinIP to 
> establish a point-to-pont connection?

In most common scenarios you are acting as:

1) UDP server - Bind to local port. When you receive a datagram, next 
sending operation send datagram back as reply.

2) UDP client - Connect to remote address and port. Send query 
datagram to remote server and next Recv operation reads server reply.

See, you not need any special handling in these typical scenarios. If 
you need to have point-to-point channel and send/receive data 
randomly, isn't TCP stream better solution?

BTW: UDP is dataram based, it is not a byte stream. So, you need to 
read full datagram, not just a first byte. Take a look for RecvPacket 
method, even you wish just first byte from the datagram.



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
https://www.geoget.cz/ - Geocaching solution



___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


[Synalist] New SSL plugin for OpenSSL 1.1.*

2021-05-19 Thread Lukas Gebauer
Hello,

on the SVN is new SSL plugin designed for OpenSSL 1.1.0 and 1.1.1 
named as ssl_openssl11. 

Why new plugin?

- new OpenSSL libraries naming convention 
- lot of OpenSSL API is obsolette
- some new API is here
- Older weak OpenSSL versions cannot be used by this plugin.
- removed NET support (as obsolette)

Where you can get OpenSSL binaries? Try: 
https://wiki.openssl.org/index.php/Binaries 
Binaries from F. PIETTE is good start!

Please, consider this plugin as beta! I cannot test it on all 
platforms. Test it please, and report bugs.

Of course, old ssl_openssl plugin is still here, but not all features 
working well with new OpenSSL 1.1.0.

Thanks!


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
https://www.geoget.cz/ - Geocaching solution



___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] function waitingdata/waitingdataex

2019-09-30 Thread Lukas Gebauer
> WaitingData(Ex) is for me a very important function as it is also used in
> TUDPBlockSocket.
> I have for example, 40 hosts that send UDP datagrams of constant length
> (10byte) asynchronosly to my application.
> In a repeat..until block I loop through all the 40 UDP sockets.
> If WaitingData<10 then I loop to the next. If WaitingDate=10 then I use one
> of the recv.. functions with 10ms timeout to get the data and process it.
> This loop should be done in less than 1ms.

You need UDP server for this. Simple loop in the thread:

while not terminated do
begin
s := RecvPacket(500);
  if s <> '' then
begin
//do something with datagram
end;
end;

This code is fast, consume 0% CPU, datagram are processed as soon as 
possible. And can process datagram with any size. It is very easy. 
Just you can wait max. 500ms when you terminating the thread. 

As I said before, Waitingdata is not needed when you are using 
receive functions with timeout. It is just code waste.

> But when I use the recv(1).. function without WaitingData and only a timeout
> (let us say 1ms) then I would lose 40ms when no data is received in the
> loop? 

Why? It is exaclty same! Timeout in recv functions is implemented by 
Waitingdata call.



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
https://www.geoget.cz/ - Geocaching solution



___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] function waitingdata/waitingdataex

2019-09-26 Thread Lukas Gebauer
> I have not completely understood the difference between this two functions
> (waitingdata/waitingdataex).
> In my understanding, the waitingdata function gives the number of bytes that
> are in the OS buffer, while waitingdataex gives the sum of bytes in the OS
> buffer + bytes in the HW buffer?
> Has anyone an advice in which case to use which function?

WaitingData working with OS level only. It return true if something 
is in OS buffers. Otherwise it waits until serial port receive some 
data.

WaitingDataEX returns true, if some data laying in Synaser internal 
buffer. Otherwise it call WaitingData.

In normal case you do not need WaitingData* at all! It is needed if 
you are using low-level access to serial port only. 
Better to use high-level reading functions (all with timeout 
parameter), they are calling waitingdata internally when it is 
needed.

> And a second question if I may:
> For the Recv. functions there is a timeout, example a:=RecvByte(50)
> What happens during thin 50ms timeout?
> When a byte is received during this 50ms, will it be contained in the
> function result?

50ms is not reasonable timeout for reading from the serial port. 
RecvByte is very simple case, because it waiting for one byte only. 
So, if byte is in buffers, it is readed immediately. If buffers are 
empty, Synaser waiting until byte is received. Because you can wait 
forever in some cases, you must define timeout. So, it is maximum 
time for device reaction. After this time you can consider device as 
non-functional. So, preffered timeouts are in seconds.

Look at stronger read function, like RecvString. It reading data in 
loop to Synaser internal buffer, until it found CRLF sequence. 
However all internal subsequent reads using your timeout again. So, 
it is "interpacket timeout", not "overall timeout". In other words, 
it is maximum time for silence on the wires.

Typical usage of Synaser is call command to device and wait for 
reply. AT modem command, for example. You send some command into 
device, and you wish to read response. But what to do when device is 
not connected or busy? How long you wish to wait for response? 3 
seconds? OK, then you call SendString with command, and next command 
will be RecvString with 3000ms timeout. It is all! You got response 
soon as possible, or timeout error after cca 3000ms and you know - 
device not responding.

It is very simple. With RecvString, RecvTerminated and RecvBufferEx 
you can implement high-level reading for any protocol.

Hope this help you.


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
https://www.geoget.cz/ - Geocaching solution



___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] how to decrypt AES encrypted string

2019-01-28 Thread Lukas Gebauer
> Is there a way to decrypt a Streamsec AES (CBC) encrypted string using SynaAES
> 
> var AES :TSynaAes;
> aes := TSynaAes.Create(mykey);
> //aes.SetIV(mykey); ??
> sr := aes.DecryptCBC(st);
> 
> this obviously does not work

You must know:

1) how to use a key. Sometimes it must be padded to X bytes, etc. For 
example, in SMTP protocol it is:

aes := TSynaAes.Create(PadString(FPrivKey, 16, #0));

2) IV (Inicialization Vector) is mandatory! Various application 
computing IV by a different ways, include salting.

If you not know both, then you must study StreamSec default values.



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
https://www.geoget.cz/ - Geocaching solution



___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] RecvBuffer() reads less data than reported by WaitingData()

2018-10-12 Thread Lukas Gebauer
> WaitingData() returns e.g. 932 bytes, but consecutive RecvBuffer() reads
> 1 byte only and that situation repeats, see log fragment:
> 
>   [C>>S]  [CNT]  "1" bytes echoed
>   [C>>S]  [CNT]  "548" bytes echoed
>   [C<   [C

Re: [Synalist] Verifying HTTPS server certificate and host name

2018-08-13 Thread Lukas Gebauer
> > how do you make sure the https connection is really secure and the 
> > server uses a valid certificate?

And what about to use OnVerifyCert event and verify certificate by 
any your code? 

For example, read CN from certificate and compare it with your 
hostname.


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
https://www.geoget.cz/ - Geocaching solution


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] CanRead always False

2018-01-29 Thread Lukas Gebauer
> I use FPC (CodeTyphon) with Synapse 4.0. I have tried simple echo server 

What is Synapse 4.0? 
Forget old Synapse Release model, always use current SVN version 
instead. Many fixes are here.

I know, my old Synapse web is not clear about it and is not updated 
for long time.



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
https://www.geoget.cz/ - Geocaching solution


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] Gmail SMTP

2017-12-11 Thread Lukas Gebauer
> 20171210-131550.965 7FFFEFA4EB10-> MAIL FROM:<"n" <xxx...@gmail.com>> 
> SIZE=35
> 
> 20171210-131550.965 7FFFEFA4EB10HR_WriteCount: 57
> 20171210-131551.018 7FFFEFA4EB10HR_CanRead: 
> 20171210-131551.019 7FFFEFA4EB10HR_ReadCount: 53
> 20171210-131551.019 7FFFEFA4EB10<- 555 5.5.2 Syntax error. 
> e204sm2934048qkb.25 - gsmtp

As you can see, you have syntax error in sender's address. It must be 
pure email only 'xxx...@gmail.com'. You are passing '"n" 
<xxx...@gmail.com>' instead, and Gmail reject it as "Syntax error".



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
https://www.geoget.cz/ - Geocaching solution


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] SMTP issues

2017-06-08 Thread Lukas Gebauer
> Now I have problems with SMTP, it worked like a charm with the previous 
> version of Ubuntu, but now I get:
> 
> 20170608-074744.883 7FFFEFAE6630HR_Error: -2,error:140770FC:SSL 
> routines:SSL23_GET_SERVER_HELLO:unknown protocol

You are trying to start TLS on nonencrypted server, or server using 
unsupported encryption.

>   if (SMTPHost ='587') then begin 
>SMTP.AutoTLS := True ;
>SMTP.FullSSL := false;
>   end else begin
>SMTP.AutoTLS := false;
>SMTP.FullSSL := True ;
>   end;

If you are connecting to standard port 25, then you are enabling 
FullSSL? It is error.

Right will be:

25 and 587 - AutoTLS
465 - fullSSL

Or better, let user to select encryption mode independently to allow 
non-standard configurations.

-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] New synapse issues

2017-06-08 Thread Lukas Gebauer
> SSL/TLS support is not compiled!
> 
> Installing the libssl-dev package did not fix the problem.

Have you ssl_openssl unit included with your project?

If yes, then loading of OpenSSL libraries failed. 
You not need "dev" package with C sources. You need runtime SO 
libraries: libssl.so and libcrypto.so


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] New synapse issues

2017-06-07 Thread Lukas Gebauer
> imap.FullSSL:=true;
> imap.AutoTLS:=true;

Never use both options at same time!

AutoTLS connect to standard IMAP port 143, and then it turn on 
encryption by special IMAP protocol command. It is called as explicit 
encryption.

FullSSL using impicit encryption. It create encrypted connection from 
the beginning. Because It cannot talk by standard unencrypted 
protocol commands, it must connect to different TCP port 993. 

Buth modes cannot be mixed. Use one or second, depending on your 
server.

If is still failed, then see what says imap.sock.lasterror, 
imap.sock.lasterrordesc, imap.sock.ssl.lasterror and 
imap.sock.ssl.lasterrordesc.

You can use synadbg.pas unit for detailed communication log too.



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] slight bug in Synaser

2017-06-07 Thread Lukas Gebauer
> I discovered a very slight bug in Synaser under windows 10 when using
> BlueTooth Serial Ports.
> 
> On line 2300, in this particular case, the string returned by reg.ReadString
> is badly terminated and the last character is missing, leading to all ports
> named as `COM´.

Ok, commited as SVN#207.
Thank you!


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] TUDPBlockSocket RecvPacket returned 10054 10054

2017-05-23 Thread Lukas Gebauer
> > >   s := FServerSock.RecvPacket(10);

> > BTW: this function is not designed for too small timeout.

> What should be the timeout value and if it is comparable with the one
> second, then how to use TUDPBlockSocket to make the thread quick respond to
> other operations, for example termination?

What is multitasking time slice on your system? It is usually higher 
then 10ms. So, on little bit busy systems it not assure fast thread 
response. And it eating CPU for each cycle.

Why you need a fast response to thread termination? When you need to 
terminate thread by a command? 
On application end, and when user want to kill the thread by some 
reason. Both can have react times like 500ms without any negative 
consequences. Even you need to have very fast responses for some 
reasons, you can use 100ms for example. It test thread termination 10 
times per second. It is not enough?

These times are valid for situations without any data was received. 
When some UDP is delivered, then thread wake up immediately.

BTW: on some my TCP/UDP servers without GUI (it is system services) I 
am using timeout 1000-2000ms. No problem.


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] TUDPBlockSocket RecvPacket returned 10054 10054

2017-05-22 Thread Lukas Gebauer
> What could mean getting an 10054 "Connection reset by peer" error on
> executing RecvPacket of TUDPBlockSocket?

On a UDP-datagram socket this error indicates a previous send 
operation resulted in an ICMP Port Unreachable message.  

At least Winsock doing this, try to Google "UDP 10054" for more 
descriptions.

>   s := FServerSock.RecvPacket(10);

BTW: this function is not designed for too small timeout.



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] Trouble with Synapse in some Linux versions

2017-05-15 Thread Lukas Gebauer
> I developed a program to send (IMAP) and receive email on Lubuntu 15.10 with 
> Lazarus 1.4.4.
> There it runs perfectly.
> When I run it on newer Linux versions, luke Lubuntu 16.04, Xubuntu 16.04 or 
> Debian Jessie, it runs but cannot send nor receive email. The login fails.
> 
> I installed Lazarus on Debian Jessie, and compiled there my program, thinking 
> that in that way it may be linked with the right libraries. It compiels fine, 
> but still it fails to connect by SMTP or IMAP when it runs.
> 
> May be Synapse, which is quite old, links with outdated ssh libraries? I 
> don't know.

Did you mean "it using SSL"? If yes, then Synapse not yet supporting 
OpenSSL 1.1.

However I have some patches by Patrick Chevalley (thank you!), so I 
plan to add support for latest OpenSSL versions soon.


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] Error with OpenSSL 1.1

2017-04-12 Thread Lukas Gebauer

Latest changes are a few months ago... I have no time for huge 
development now, however Synapse still working fine.

Fact is - OpenSSL 1.1 still not sopported yet. Sorry.

> I wouldn't count on it, I think Synapse has been abandoned for a very long
> time.
> 
> On 7 April 2017 at 20:12, Mattia Verga <mattia.ve...@tiscali.it> wrote:
> 
> > Hi,
> >
> > I'm not a developer, but just a user of Skychart
> > (http://www.ap-i.net/skychart), which uses Synapse in its code.
> > I've found that using Synapse with OpenSSL gives an error:
> > Error: 500  error:140A90C4:SSL routines:func(169):reason(196)
> >
> > I suspect that this is due to the fact that OpenSSL now uses
> > TLS_method() as default instead of SSLv23_method() (see
> > https://www.openssl.org/docs/man1.1.0/ssl/SSL_CTX_new.html).
> > At the moment only Fedora 26 has switched to OpenSSL 1.1, but this will
> > probably become a problem with other distributions too in future.
> >
> > I would like to put this under your attention and ask if there's any
> > workaround or Synapse update planned to fix that.
> >
> > Thanks
> > Mattia
> >
> >
> > 
> > --
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > ___________
> > synalist-public mailing list
> > synalist-public@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/synalist-public
> >
> 



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] filtering of UDP port numbers

2016-12-19 Thread Lukas Gebauer
>   rx:=udprx.RecvByte(1);

BTW: most effective way for reading UDP data is by RecvPacket, 
because UDP data are transmitted by a datagrams. And RecvPacket can 
wait for next datagram (no need to call WaitingData before) and is 
capable to read whole datagram by one call.



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] help with post

2016-03-19 Thread Lukas Gebauer
>  but I wonder how to make using the synapse without using another library

This your code is bad:

   lPostData :=TStringList.Create;
   lPostData.Add(EncodeURL('grant_type=client_credentials'));
   lPostData.Add(EncodeURL('scope=product:show stock:save 
stock:update warehouse:list warehouse:save warehouse:show 
warehouse:update'));
   lPostData.Add(EncodeURL('client_id='+clientid));
   lPostData.Add(EncodeURL('client_secret='+clientsecret));
   WriteStrToStream(ht.Document, EncodeURL(lPostData.Text));

Too many bad encodings. ;-)

Try this instead:

s := 'grant_type=' + EncodeURLElement('client_credentials') +
'=' + EncodeURLElement('product:show stock:save stock:update 
warehouse:list warehouse:save warehouse:show warehouse:update') +
'_id=' + EncodeURLElement(clientid) +
'_secret=' + EncodeURLElement(clientsecret);
WriteStrToStream(ht.Document, s);



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231=/4140
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] help with post

2016-03-18 Thread Lukas Gebauer
I see.. you have double content-type header in HTTP query. Remove 
this line:

ht.Headers.Add('content-type: application/json');

Maybe you need to remove Accept header too. (or repair it, because 
response can be something different then HTML...)

> i tried, exactly as you said.
> but did not worked...
> i got the same message error...



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231=/4140
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] Which version of TLS does synapse support

2016-02-28 Thread Lukas Gebauer
> The 32 bit dlls with embarcadero give me
> 
> S: 13 : 10091,error:14082174:SSL routines:SSL3_CHECK_CERT_AND_ALGORITHM:dh 
> key too small

This is not error on your side. It meaning - server using too small 
DH key. And small DH key is disabled in newer OpenSSL as prevention 
to Logjam attack. See the https://weakdh.org/


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] snmpv3 3des

2016-01-29 Thread Lukas Gebauer
Sorry, I was a busy. ;-(

But I am little confused. What is TV3KeyType, I not found it in my 
sources... :-o

> i found out how to fix this 3des issue
> 
> the missing step is very easy
> just append after the line
> 
> FPrivKey := Pass2Key( TV3KeyType.PrivKey, FPrivPassword );
> 
> one more step if the key is smaller than 32
> 
> if Length( FPrivKey ) < 32 then
>FPrivKey := FPrivKey + Pass2Key( TV3KeyType.PrivKey, FPrivKey );
> 
> it is not yet perfect because it must be something like this
> 
> while Length( FPrivKey ) < 32 do
> ...
> 
> but for the moment its working for me, i will send the correct version 
> sson
> 
> cheers k1


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] UDP checksum

2016-01-29 Thread Lukas Gebauer


> Good evening,
> 
>  
> 
> I read this very interesting explanation about UDP-server, UDP-client by
> Lukas Gebauer (see below).
> 
>  
> 
> My additional question is : does Synapse do UDP checksum verification? I
> read somewhere that this is optional for UDP.
> 
>  
> 
> In other words, when I send data (10 bytes only) in a UDP datagram, shall I
> provide my own checksum (in the data block itself) or can I rely on UDP
> checksum mechanism of Synapse?

Synapse does not do checksums. It is job for underlaying Winsock 
layer. Synapse working with payload only.

So, you send 10 bytes by Synapse. Synapse pass 10 bytes into winsock 
(or other sockat layer interface), and winsock made UDP datagram with 
all needed headers and checksums.

On Receive Winsock read datagram, check checksum. And if all is OK, 
then it pass to Synapse 10 bytes of data.

Sometimes you can control how Winsock handle checksums by setsockopt 
call. But it is depended on platform and operating system version. 

See this:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms738603%28v=
vs.85%29.aspx



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] SSL/TLS support is not compiled - Kylix

2015-11-19 Thread Lukas Gebauer
> But those libs are there in the \lib folder.
> I copied them to the same folder of my application but unforntunatelly the 
> error "-2: SSL/TLS support is not compiled "remains

Please, check if you really have ssl_openssl unit in your uses.

If yes, verify SSLImplementation global variable, if it contains 
TSSLOpenSSL.

If not, then loading of libs failed for some reason. You can try to 
trace InitSSLInterface function and see, if LoadLibs calls are OK.


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] SSL/TLS support is not compiled - Kylix

2015-11-12 Thread Lukas Gebauer
Please, check real openssl library filenames and verify if it is same 
as names used by ssl_openssl_lib.pas. Maybe is a problem with 
compiler defines and unit is compiled with wrong library names.

When wrong library names are used, then Openssl not loaded and you 
got your error.

L.


> Hi,
> That's the point... 
> I couldn't use lazarus because my Company has a version builder of
> their products. And this builder use Cross Kylix... Unfortunately.


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] bug with LFCR

2015-09-29 Thread Lukas Gebauer
>I had problem with TBlockSocket.RecvTerminated.
> When send frame  (each line ended with LF char) contain body started
> with CRLF chars, first char of body are eat an then socket claim 10054
> error (because body is one char shorter)
> 
> problem is with  function PosCRLF (form synautil) : it should not take
> LF as begin of LFCR (only very ancient system use this )

PosCRLF is called when ConvertLineEnd option is enabled only. 

This option is designed for handling faulty implemetations. When you 
are expecting CRLF, but faulty implementation sending bad line 
ending. This was often problem in Synapse born times. But today not, 
I hope.

Not a big reason for use this option today. It is just slow.

If you have frames ended by LF, why not use RecvTerminated with exact 
LF terminator?



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] SSL version 1.0.0

2015-08-25 Thread Lukas Gebauer
 I'm trying to use openssl on new server with 1.0.0 version
 /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0
 does synapse supports this version? I'm getting an error on simple
 program
 
 program test;
 uses classes, sysutils, httpsend, ssl_openssl, blcksock;
 
 var url: string;
  http: THTTPSend;
  res: TStringStream;
 begin
 
url := 'https://www.google.com';
http := THTTPSend.Create;
http.sock.SSL.SSLType:= LT_SSLv3;
http.Sock.SSL.VerifyCert := false;
http.Timeout := 10 * 1000;
res := TStringStream.create('');
if http.HTTPMethod('GET',url) or true then
begin
  res.CopyFrom(http.Document, http.Document.size);
  WriteLn(res.DataString);
  WriteLn(http.ResultCode);
end;
http.free;
 end.
 
 I'm getting result code 500

I am trying version 1.0.1p on Windows, and it working fine.
Are you sure if your server supports SSLv3? It is usually disabled as 
weak protocol now. Try to remove setting of http.sock.SSL.SSLType and 
left default (it use best available protocol).



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] how to change SFTP to work with OpenSSH 6.9?

2015-08-12 Thread Lukas Gebauer
 I'm using the DLL from:
  http://synapse.ararat.cz/files/crypt/cryptlib-3.2.2.zip
 I just checked, and it is the same I'm using, and is from late 2005.
 
 I strongly suspect that a newer DLL would solve the problem.
 Where can I get the official latest version?

Try this web:
https://www.cs.auckland.ac.nz/~pgut001/cryptlib/

Do not forget update DLL and interface PAS file from the downloaded 
package.

It should work, if API was not changed between versions...


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] Synapse in Lazarus on Linux with user privileges not working.

2015-08-12 Thread Lukas Gebauer
It is worst! You need rights for RAW socket.

Similar situation is on Windows too, but Windows publish special API 
for sending ping by non-admin users. Synapse can use it. But on Linux 
I not know any special API.

Synapse documentation says:

Warning: For use of RAW sockets you must have some special rights on 
some systems. So, it working allways when you have administator/root 
rights. Otherwise you can have problems!  

 That's because on Linux you must be root to send ping packets for
 users not to flood hosts with ping packets. It is a security thing.
 You can not bind to a port below 1024 as a normal user. 
 
  Original message 
 From: Piotr Polok piotr.po...@polok.pl 
 Date: 11/08/2015  23:22  (GMT+02:00) 
 To: Ararat Synapse synalist-public@lists.sourceforge.net 
 Subject: [Synalist] Synapse in Lazarus on Linux with user privileges
 not   working. 
 
 Hi,
 
 when I start Lazarus IDE from root account the PingSend.PingHost(host)
 works properly, but when I start Lazarus IDE from user account the
 PingSend.PingHost(host) gives all the time '-1' result.
 
 Lazarus version: 1.4.2
 FPC, FPC-SRC version: 2.6.4
 Synapse version: 40
 OS: Debina 8.1 on Oracle VM
 
 please help in solving this problem.
 Piort Polok
 
 --
  ___
 synalist-public mailing list synalist-public@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/synalist-public



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] [patch] fix for compilation problems with C++ Builder

2015-02-17 Thread Lukas Gebauer
 I'm using Synapse with C++ Builder XE7 (and XE6 before). The patch
 attached is needed for getting over the following compile errors:

OK, patched.
Thank you!



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631iu=/4140/ostg.clktrk
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] Warning removal patch

2015-02-17 Thread Lukas Gebauer
 2. My colegue woudlike to improve SMTP client - just question. Are you
 agree with this extension?

It would be interesting. But I would like to see it first. You can 
send me an email directly.

Thank you!


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631iu=/4140/ostg.clktrk
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] Serial USB Device with Linux - which version should i use

2014-10-22 Thread Lukas Gebauer
 i have a program that reads an writes from a USB device.
 with windows i use a ftdi driver to create a virtual com port that i'm
 accessing. This works. Now im going to port this program to linux. The
 device is recognized as /dev/ttyUSB0. Synaser in its code uses
 /dev/ttyS but this is not working for me.

I am little confused. Synaser code is designed for any device name! 
ttyS is used just for translate windows COMx names into linux 
names. So, call Connect with any linux devicename does not work? If 
not, then it is a bug.

 So i have changed the synaser code to access /dev/ttyUSB but when i try
 to access this device it crashes. 

What crashed, where it crashed? How it crashed?

 So, for further debugging, i'm using synaser40 the official release
 (?) Should i use the latest trunk 192 ore should i stay with the 40?
 The program is productive several users use the program with windows
 that means its not experimental.

Use version from the SVN. Release 40 is very old, and I rather 
updating SVN, where you can find most actual sources.


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] SendStream not working

2014-09-24 Thread Lukas Gebauer
 I started use Synapse few days ago. I´m trying to use the function
 SendStream(TTCPBlockSocket), but it seems that doesn´t work properly.
 I can send all bytes but the receiver side get the stream (or a file)
 corrupted. 

What you mean by 'corrupted', and how you are reading this stream?



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] SMTP send via STARTTLS

2014-09-12 Thread Lukas Gebauer
 == snip ==
 WSANO_RECOVERY
 11003
 
 This is a nonrecoverable error.

Synapse simulationg this error in some cases, especially on socket 
level proxy error. Without source code I really not know what you are 
doing.

For 'subject' you really need to place Openssl DLL into same folder 
as your compiled EXE, compile your program with ssl_openssl in your 
uses, and enable tsmtpsend.starttls property. It is all.

When you have SSL related problem, check 
tsmtpsend.sock.ssl.lasterrordesc for description. Just sock.lasterror 
have some simulated or unrelated error code.


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191iu=/4140/ostg.clktrk
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] ALternatives to ping

2014-07-07 Thread Lukas Gebauer
 I'm trying to validate the web addresses I have on my database. My
 first thought was ping, but that's generating a lot of false failures
 (ie the website is there but not responding to ping). Is there an
 alternative to check if the website is there?

If it is a web, try to use HTTP HEAD request.


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] Synaser and /dev/ttyACM

2014-07-07 Thread Lukas Gebauer
 Up till now we always worked with FTDI and Prolific cables and the
 data that's been sent by our device can be received correctly. Now we
 started using a new FPGA that has an Exar USB serial convertor on
 board.
 http://www.exar.com/connectivity/uart-and-bridging-solutions/usb-
 uarts/xr21v1410 It is recognized on Linux as a ttyACM* device and the
 data is for some reason corrupted, bytes are missing and/or
 transformed. It however receives  data but it does not correspond to
 what has been sent.

Maybe you have just wrong serial communication parameters. Invalid 
bit count, stop bits, parity, speed... and your data transfer goes 
out of synchronization.



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] binary udp SendBuffer

2014-06-11 Thread Lukas Gebauer
 I need to send commands to microcontroller using udp protocol.
 I try Sock.SendBuffer(@Buff, Len); to transmit command and
 Len := Sock.RecvBuffer(@Buff, 256); to receive a reply/acknowledge. It
 works if command is correct. If not, controller do not reply and
 RecvBuffer waits forever(or unacceptably long time). Problem is i do
 not know how to specify a timeout for RecvBuffer function. There are
 timeout parameter in similar function RecvPacket, but RecvBuffer looks
 more suitable for binary data.

Do not use RecvBuffer, until you have very special reason for that!

RecvPacket is function designed for reading binary UDP datagrams. It 
is used in all my UDP protocol implementations too. (SNMP, DNS,...)


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing  Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] Problem snmp-get, system time

2014-04-08 Thread Lukas Gebauer
 When I use try to retrieve the system time by using snmp-get I get
 strange output.
 
 var
   test : AnsiString;
 begin
   if SNMPget('1.3.6.1.2.1.25.1.2.0', 'public', '192.168.1.1', test)
   then
 ShowMessage(test);
 End;
 
 This is the output I get from snmpwalk:
 snmpwalk -v 1 192.168.1.1 -c public .1.3.6.1.2.1.25.1.2.0 -On
 .1.3.6.1.2.1.25.1.2.0 = STRING: 2014-4-8,10:26:51.3,+2:0

What is content of your test variable?


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test  Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] Problem snmp-get, system time

2014-04-08 Thread Lukas Gebauer
 The test variable contains: #7'?'#4#8#13#13#15

It is because you got sequence of binary fields in the ansistring. It 
is not directly readable value, you must decode it. Each byte in 
string meaning some value from date and time. 

See:
http://www.webnms.com/snmp/help/snmpapi/snmpv3/using_mibs_in_applns/tc
s_dateandtime.html

For example, when you read fifth char from returned string and 
convert his value tu number, you got number of hours. etc.


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test  Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] login and download file (HTTP)

2014-03-26 Thread Lukas Gebauer
 How to download a file from a web page with Synapse?
 The file can't be accessed until we are logged in.
 
 Transfer-Encoding: chunked
 
 |form action=/login.php method=post class=padder

Use one THttpSend instance, and made two requests. One send HTML form 
data with your credentials, second for downloading. While you use one 
THttpSend instance, you must not manage cookies.


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Learn Graph Databases - Download FREE O'Reilly Book
Graph Databases is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] LDAPSend binary atachment - jpegPhoto

2014-03-12 Thread Lukas Gebauer
 Thank you Daniel for your quick answer. Unfortunately i could not find
 EncodeBase64 function but i have managet to get it working. 

It is part of Synapse too! See the SynaCode.pas unit.



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Learn Graph Databases - Download FREE O'Reilly Book
Graph Databases is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] LDAP paging of search results patch

2014-03-12 Thread Lukas Gebauer
 attached is a small patch to add RFC-2696 LDAP Control Extension for
 Simple Paged Results Manipulation support to the Synapse LDAP Search.
 
 The included 'ldapsample.pas' is an update of the LDAP sample code to
 show how to use it.
 
 Feel free to change it as you see fit - I'm just trying to give a
 little back... thanks for a great library. :)

Thank you, this is great addition!



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Learn Graph Databases - Download FREE O'Reilly Book
Graph Databases is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] LDAPSend binary atachment - jpegPhoto

2014-03-12 Thread Lukas Gebauer

You are right, I missed this addition.

Adopted and included in SVN now!

Thank you.

 
 
 Hi Lukas, thank you, i have missed this since i didn't include this
 unit in my project. 
 
 Now everything is just great. 
 
 A small patch developed by Ulrich Doewich helped me allot, it is
 regarding RFC-2696 which is not supported by ldapsend. With this i
 could retrieve over 24000 objects from AD, otherwise only 1000. 


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Learn Graph Databases - Download FREE O'Reilly Book
Graph Databases is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] LDAPSend binary atachment - jpegPhoto

2014-03-11 Thread Lukas Gebauer
 Hi, i have successfully used ldapsend to browse my AD and to add small
 attributes. Now i want to add the jpegPhoto attribute to some users
 but i am facing a lot of problems. 

Please, try to reas some existing Jpeg from the LDAP and see, how it 
is encoded. Maybe it is encoded as Base64.





-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Learn Graph Databases - Download FREE O'Reilly Book
Graph Databases is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] Bus - Solution - File: synaser.pas in Mac OS X

2014-03-03 Thread Lukas Gebauer
 Hello! I'm using Synapse on Mac OS X for some time. But every time
 than update the svn, I have to fix a small bug:
 
 It is exactly in line 1945 of the file: synaser.pas

Thank you, fixed as SVN #188.



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Subversion Kills Productivity. Get off Subversion  Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951iu=/4140/ostg.clktrk
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] [Patch] Language fixes for misc unit

2014-03-03 Thread Lukas Gebauer
 Sponsored patch: this patch is sponsored by the hope that this draws
 more attention to a related patch that actually fixes a bug I face:
 [Patch] LibSSH2 private key authentication failure: more precise error
 reporting posted 30 October 2013

Thank you, merged into SVN as #189.



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Subversion Kills Productivity. Get off Subversion  Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951iu=/4140/ostg.clktrk
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] text/plain and base 64

2014-02-28 Thread Lukas Gebauer
 I got such a mail and find no way to get the body as readable text
 with messpart, ect. This is the header with the frist and half second
 line of the base64 code.

You are probably totally missed how to Synapse working!

You must not call any decode function by yourself, all is done by 
Synapse. Once you call TMimePart.DecodePart, then you have decoded 
content in TMimePart.DecodedLines stream. Just read it from here.



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis  security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071iu=/4140/ostg.clktrk
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] inline images

2014-02-28 Thread Lukas Gebauer
  part.decode
  htmlviewer.loadfromstring(part.PartBody.Text);

What is it? You must call: 

part.DecodePart;
htmlviewer.loadfromStream(part.DecodedLines);

When htmlviewer ask you for some image, you must find MIME part with 
data, decode it by DecodePart, and then read binary image data from 
DecodedLines stream.



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis  security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071iu=/4140/ostg.clktrk
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] (no subject)

2014-02-28 Thread Lukas Gebauer
 ok, my net administrator give me the address to connect to ours smtp
 mail server: address: 172.16.3.6 port: 25 it have no user and no
 password.
 
 Debugging source, i have seen that, when i use smtp.Login() it
 arrives at unit blcksock, and it execute
 
 procedure TBlockSocket.Connect(IP, Port: string);
 
 In this procedure, after the execution of 
 
 SockCheck(synsock.Connect(FSocket, Sin));
 
 i have FLastError = 10061

See the LastErrorDesc too! This error is Connection refused. So, 
someone does not allow you to connect by security reasons. Usually it 
is firewall or antivirus software. (As prevention to mass mailing 
worms, etc.)



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis  security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071iu=/4140/ostg.clktrk
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] Decoding email address and destination name

2014-02-21 Thread Lukas Gebauer
 Has anyone out there developed a routine to split the name and email
 address that will handle all of the variations allowed by the RFC?
 
 Mine does a pretty good job but I just received one addressed to:
 
 Roy Lambert roy@lybster. me. uk r...@lybster.me.uk

Standard Synapse functions like getemailaddr and getemaildesc does 
not work?


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471iu=/4140/ostg.clktrk
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] (no subject)

2014-02-05 Thread Lukas Gebauer
 I've made 3 test:
 smtp.Sock.HTTPTunnelPort:='465';  10061: Connection
 refused smtp.Sock.HTTPTunnelPort:='25';   10061:
 Connection refused smtp.Sock.HTTPTunnelPort:='';
 10049: Can't assign
 requested address

This is port of your HTTP proxy! Synapse open connection to your 
proxy and then try to create tunnel to destination port of your TCP 
connection. SMTP usiong port 25, but usual proxy configuration allows 
just HTTPS ports like 443. You must ask your proxy administrator for 
allowed ports for HTTP proxy tunnel.


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231iu=/4140/ostg.clktrk
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] (no subject)

2014-02-04 Thread Lukas Gebauer
  smtp.Sock.HTTPTunnelIP:='ProxyName';
  smtp.Sock.HTTPTunnelPort:='8080';

Usual proxy configuration does not allow tunneling to SMTP ports. Are 
you sure if your proxy allow tunneling to port 25?


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231iu=/4140/ostg.clktrk
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] WaitingData() return value

2013-11-25 Thread Lukas Gebauer
 I investigated the issue and found that WaitingData() when called from
 TBlockSocket.RecvPacket() Will trim any value 8192, and since a TFTP
 packet of 8192 is actually 8196 in size the system fails.

Waiting data return number of bytes, what ca be readed by single Recv 
call without blocking. In another words, how many bytes waiting in 
internal operating system buffers for read.

And default buffer size (at least on Windows) is... 8192 bytes.

So, try to increase receiving buffer by:
sock.SizeRecvBuffer := 32768;

 I have multiplied the value returned from WaitingData() by 5 and to my
 great surprise it works OK for packets upto 32KB.

It is interesting. It using UDP protocol, and larger UDP packet must 
be readed somewhere inside operating system, because it is received 
as one packet. It can be just sideeffect in this case. However you 
cannot be sure, if it working same way on all operating system 
versions.



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311iu=/4140/ostg.clktrk
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] synser question/problem

2013-11-21 Thread Lukas Gebauer
 The settings in hyperterminal/procomm are the same as my app which
 does this:
 
 ser.Config(9600,8,'N',1,true,false);

Are you really want 1.5 stopbit? Have you verified LastError after 
Config call? Maybe your settings using unsupported combination of 
parameters and then Config do nothing - serial port stay with 
previous configuration used by hyperterminal.

For one stopbit you must use value 0. Best way is to use predefined 
constants:

  {:stopbit value for 1 stopbit}
  SB1 = 0;
  {:stopbit value for 1.5 stopbit}
  SB1andHalf = 1;
  {:stopbit value for 2 stopbits}
  SB2 = 2;



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311iu=/4140/ostg.clktrk
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] mimepart OnWalkPart override?

2013-10-31 Thread Lukas Gebauer
 how can i override or otherwise enhance OnWalkPart?
 
 i want to add a couple of lines to it to show the
 part[-subpart[-subsubpart]] numbers... i can't seem to do what i
 want/need to do because it is marked Private... i can't get the info
 into or out of my WalkPart routine :?

No reason to modify WalkPart routine. Just write your own similar 
function in your program. Modification of TMimePart class is not 
needed.

TMimePart does not have a position information inside. Just because 
you can grab some TMimePart and add it into another TMimePart.

For get postition, you must iterate on Subparts (you can do it by 
your own code, no TMimePart modification needed!). And iterate on 
subparts of each subpart, etc. It is just unbalaced tree of TMimePart 
instances. Each TMimePart can have any nymber of Subparts.


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951iu=/4140/ostg.clktrk
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] mimepart walkpart

2013-10-15 Thread Lukas Gebauer
 can you provide a working example of using walkpart to actually walk a
 multipart email, please? the examples are much too simplistic...
 especially the FPC one which simply decodes and the re-encodes the
 same part without doing anything...

What is hard on walkpart? It is good when you need to enumerate all 
parts of message. (for example, for antivirus/antispam checks).

It simply walk through MIME part structure in message and fire event 
for each TMimePart. Inside event you can emumerate TMimePart 
properties and do what you need.

For implementing GUI is better another way - see the Mime demo (for 
Delphi, but it is very easy!)



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60135031iu=/4140/ostg.clktrk
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] ldapSend blank username and password not working

2013-10-09 Thread Lukas Gebauer
 I test ldapSend to query user's position in AD tree.
 
 The problem is that I must always specify username and password
 otherwyse I cannot search (always return 0).
 
 I tested same situation using ldp.exe utility and I can bind the
 search without specify Username and Password. Probably I missed
 something.

LDP connects to Active Directory using Microsoft LDAP SSPI 
extensions. This particularly means (simplistically) that your AD 
credentials are taken from your windows credentials automatically.

Microsoft LDAP SSPI is not supported by Synapse and you must to Bind 
into LDAP as some valid AD user with rights for browsing AD objects.


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60134071iu=/4140/ostg.clktrk
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] broken http transaction

2013-10-01 Thread Lukas Gebauer
 Router somehow interrupting the session for some reason? Why does it
 not do the same for webfs? Sockets somehow getting mixed up in their
 SYN/ACK calculations? (is this done by synsock or sockets?)

By sockets.

 Are there any options in tblocksock (or somewhere) that I should use?

Did you set Linger? This option control what to do when application 
wish to close TCP channel with pending data transfer. Maybe it is 
your problem.

So, try to set:
Listeningsocket.setLinger(true,1);
before Listeningsocket.Listen call.




-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60134791iu=/4140/ostg.clktrk
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] httpsend.sll.getcertinfo

2013-09-23 Thread Lukas Gebauer
 How can I get peername or information on host's certificate when I use
 thttpsend with ssl? I have tried:
 
HTTP := THTTPSend.Create;
HTTP.Protocol:='1.1' ;
  //http.Sock.SSL.OnVerifyCert:=mytestmethod; this did not get
  called
Http.Sock.CreateWithSSL(TSSLOpenSSL);
HTTP.Sock.SSL.VerifyCert:=true;
HTTP.Sock.SSL.CertCAFile:='/mycerts/cacert.pem';
Http.Sock.SSLDoConnect;
log( 
 'HTTP.Sock.SSL.GetPeerName+'!'+HTTP.Sock.SSL.Certificate+'/'+HTTP.Sock
 .SSL.GetCertInfo);
Resultb := HTTP.HTTPMethod('GET', urli);
 log(HTTP.Sock.SSL.GetPeerName+'!'+HTTP.Sock.SSL.Certificate+'/'+HTTP.S
 ock.SSL.GetCertInfo);
 
 But the log-lines have no info. Otherwise it works fine (retrieves the
 content).

You are creating instance of THTTPsend, starting SSL... and then you 
are connectiong to destination server and making HTTP request. It is 
not right sequence, because you are starting SSL on unconnected 
socket.

Remove SSLDoConnect at all! It is called internally when it is 
needed. And you must read peer certificate information after  connect 
to the destination. Try to use Http.Sock.OnAfterConnect event.



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151iu=/4140/ostg.clktrk
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] prolem inet_ntoa on linux

2013-09-10 Thread Lukas Gebauer
 I use synapse on linux on typhon 4.4(lazarus) I have a big problem on
 the compilation of vsRawIP.pas function (inet_addr, inet_ntoa) Type
 (bool,U_long) don't work

I do not know vsRawIP function.. what is it? It is not part of 
Synapse.


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=5127iu=/4140/ostg.clktrk
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] prolem inet_ntoa on linux

2013-09-10 Thread Lukas Gebauer
  I do not know vsRawIP function.. what is it? It is not part of
  Synapse.
 
 vsrawip file on typon in the pl_synapsevs/source path

Sorry, I really not know this unit. It is not my unit. I not know 
synapseVS, what is it? Some fork or branch?

-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=5127iu=/4140/ostg.clktrk
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] newbie about this list

2013-08-26 Thread Lukas Gebauer
 I have some, and will have quite a lot of questions, so my first
 question is what is the best place to ask them. Is this list the right
 place?

Yes, this is the best place for your question.

 Some questions I have in mind and hope to come back with more details
 are
   - Is there any work on a smtp-server (I'll just need a simple one to
 receive and store mails, no relaying etc)

I made one, but it is long long time ago... however SMTP server is 
not too hard. 


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511iu=/4140/ostg.clktrk
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] Manage large byte buffers with Synapse using TUDPBlockSocket

2013-05-27 Thread Lukas Gebauer
  Oops, my fault! Your datagrams are maybe large, but are truncated.
  You maybe able to receive large datagrams, but you must increase
  winsock internal buffer first. Try to set property SizeRecvBuffer to
  value 65536.
 
 what happens if the datagrams are larger than 64k? or have i missed
 something in the thread?

Maximum size of IPv4 UDP datagram is 65507 bytes. (IPv6 too, except 
jumbograms - but I don't know if it is supported in real life.)


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Try New Relic Now  We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app,  servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] Manage large byte buffers with Synapse using TUDPBlockSocket

2013-05-26 Thread Lukas Gebauer
 We don't understand each other when speaking about datagram, I'm not using
 datagram based communication, my camera (which I can't modify) send
 those UDP packets if you prefer, which are transmitted in 1514 byte
 fragments , but this should be transparent to the program as those packets
 are reassembled at the OS level.

Do not mix datagram with frames. Frames does not matter, because we are 
operating on packet level.

UDP = User DATAGRAM Protocol It is based on sending datagram packets. 
(see: http://en.wikipedia.org/wiki/User_Datagram_Protocol) 

And each datagram packet have limited maximum size. Technically it is 
nearly 64kB on IPv4. But maximum datagram size is limited by an operating 
system too! It is indicated by iMaxUdpDg member of WSAdata structure. 

Check TUdpBlockSocket.WSAdata.iMaxUdpDg value... it is 8192 in your case, 
am I right? So, then you cannot use larger UDP datagram. UDP is designed 
for small data, not for large data transfers.

In Synapse TUDPBlockSocket practise - one send operation made one 
datagram on the wires. (it can be just one byte of data, or more... up to 
iMaxUdpDg.) One Recvpacket call receive one datagram from reading queue. 
Dunno how it is big. You got full datagram by one call.

Using other receiving funtiocn working too (because it using recvvPacket 
on the background), but it is not reliable! UDP datagram can be lost - do 
not forget it!

What happen, when you wish to read X bytes, but some datagram was lost? 
Missing bytes is readed from the beginning of next image and you are 
totally unsychronized! It is worst kind of error, because your program 
working fine... until first data lost occurs. Then your program do crazy 
things.

You must read data by recvpacket. You must examine each received packet 
and try to find begin of your image on the begin of received datagram.  
Then add all next datagrams into your image data, until you find next 
starting datagram. Sometimes you can get invalid image, but you are 
always synchronized.

--
Lukas Gebauer.

http://synapse.ararat.cz/ - Synapse Delphi and Kylix TCP/IP Library
http://geoget.ararat.cz/ - Geocaching solution



--
Try New Relic Now  We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app,  servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] Manage large byte buffers with Synapse using TUDPBlockSocket

2013-05-26 Thread Lukas Gebauer
 The problem is that every ansistring receiving RecvPacket starts with the
 beginning of the packet, but never contains the end, the next iteration of
 RcvPacket will contain the beginning of the next packet but not the end of
 the 1st one. So how can I access these ends ?

Oops, my fault! Your datagrams are maybe large, but are truncated. You 
maybe able to receive large datagrams, but you must increase winsock 
internal buffer first. Try to set property SizeRecvBuffer to value 65536.

--
Lukas Gebauer.

http://synapse.ararat.cz/ - Synapse Delphi and Kylix TCP/IP Library
http://geoget.ararat.cz/ - Geocaching solution



--
Try New Relic Now  We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app,  servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] Manage large byte buffers with Synapse using TUDPBlockSocket

2013-05-24 Thread Lukas Gebauer
 I've looked at the UDP Server example on the synapse howto (
 http://www.synapse.ararat.cz/doku.php/public:howto:udpserver), but I'm
 a bit lost identifying what method I should use. If I use RecvPacket,
 I can see that the Socket is working, but I presume that working with
 String and Lines is not the right way of doing it.

Synapse using AnsiString as managed binary buffers. So, recvpacket 
move full datagram into string. It can contain any binary data.



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Try New Relic Now  We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app,  servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] New SVN URL

2013-05-15 Thread Lukas Gebauer
 What's about git?

There is not a reason for it.


--
Lukas Gebauer.

http://synapse.ararat.cz/ - Synapse Delphi and Kylix TCP/IP Library
http://geoget.ararat.cz/ - Geocaching solution



--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] Listen UDP 415 in window service

2013-05-15 Thread Lukas Gebauer
  Anybody  wrote  Windows's  service witch listen udp port, ex syslog -
  415? I don't understand haw I can listen port in OnExecute action.

http://synapse.ararat.cz/doku.php/public:howto:udpserver


--
Lukas Gebauer.

http://synapse.ararat.cz/ - Synapse Delphi and Kylix TCP/IP Library
http://geoget.ararat.cz/ - Geocaching solution



--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] When release Delphi xe4 support for iOS ?

2013-05-10 Thread Lukas Gebauer
  So, I am thinking about a new fully unicode based Synapse branch. It
  can resolve many other problems too.
 
 Wouldn't it be better to base everything on tBytes and be fully 
 independant of string type?

Synapse core can be based on TBytes, if I drop support for oldest 
Delphi versions. And it drop code compatibility too. So, it is good 
reason for a new branch with new generation of Synapse.

However even I use TBytes, then exists lot of code in Synapse, what 
need to use strings. Functions around charset encodings, etc.


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Learn Graph Databases - Download FREE O'Reilly Book
Graph Databases is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] When release Delphi xe4 support for iOS ?

2013-05-07 Thread Lukas Gebauer
 When release Delphi xe4 support for iOS ?

Since Synapse have a Synsock module for Delphi POSIX systems now, 
full iOS support is not easy. It is becasue Synapse core is 
AnsiString based, and compiler for iOS does not have AnsiStrings at 
all.

So, I am thinking about a new fully unicode based Synapse branch. It 
can resolve many other problems too.

Question is FreePascal. AFAIK it still does not have Delphi 
UnicodeString support. Or I missing something?


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Learn Graph Databases - Download FREE O'Reilly Book
Graph Databases is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


[Synalist] New SVN URL

2013-04-11 Thread Lukas Gebauer

Hello all!

Due Sourceforge.com upgrade SVN URL was changed to:

https://svn.code.sf.net/p/synalist/code/trunk

or

svn://svn.code.sf.net/p/synalist/code/trunk

If someone downloading current snapshots from the SVN, please, 
reallocate your working copies.

Thank you.



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis  visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] How Can I Determine, If The TCP Connection Is Still Active?

2013-03-27 Thread Lukas Gebauer
 After I connected to server and took out the LAN cable and there is a
 red cross on the connection icon in the system tray, I can for about
 30 seconds to send messages, and it does not get errors!

It is because your operating system have internal buffers for sended 
and received datas. Try to set your sending buffer to zero.


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Own the Future-Intelreg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] Suggestion for blcksock multicasting

2013-03-22 Thread Lukas Gebauer
 Recently I was working on multicasting software using synapse library.
 Since our server has several network cards it came up some problem on
 what interface the multicast receiver socket binds. I figured out that
 AddMulticast is always using INADDR_ANY for the interface. 

This was modified in latest SVN snapshot before. Is it not enough?


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] OpenSSL's SSL_Connect hangs with Proxies

2013-03-06 Thread Lukas Gebauer
 However, a bug started to appear with proxies -- less with good
 private proxies, more with bad public proxies. Now and then, a few
 threads would hang and become 100% unresponsive. The timeout setting
 and the |heartbeat| code would be ignored; no exceptions would be
 raised. No matter how long I would wait (up to 10 minutes), the
 threads would still be hanging. Closing the software was the only way
 to stop the threads.
 
 I found out that the incriminated method was |SSL_Connect|. From what
 I've read, this hanging behavior can be corrected by using
 non-blocking sockets (openssl ssl_connect blocks forever - how to set
 timeout?
 http://stackoverflow.com/questions/11835203/openssl-ssl-connect-block
 s-forever-how-to-set-timeout)

Try SVN revision #182. If you set ConnectionTimeout property, then 
SSL_Connect is called in non-blocking mode here.



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] ftpsend.FtpGetFile

2013-02-20 Thread Lukas Gebauer
 I've posted an issue here
 https://sourceforge.net/tracker/?func=detailaid=3605303group_id=1252
 24atid=701386

Did you try latest SVN sources?


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] SNMP V2, 32 bits counters

2013-02-08 Thread Lukas Gebauer
 I found that oid could also be large than 2147483647 on some machine.
 You need to change variable type Integer to Longword in functions like
 MibToId as well. Thanks 2012/12/10 lionel lio...@adeli.fr

Ok, fixed in revision #176.

Thanks.


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] ASMMODE Intel

2013-02-08 Thread Lukas Gebauer
 Note that since at least 2.0.0 (some later 1.9.x version to be exact)
 {$mode delphi} includes {$asmmode intel} and it is not needed at all
 in most cases

So, removing ASMMODE directive fix the error? See revision #178.


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] Base64 decoding

2013-02-08 Thread Lukas Gebauer
 Some of the base64 encoded emails I'm receiving don't seem to be
 decoded properly. I've added an extra function in to sort it out

Can you explain your problem with more details, please? What is weird 
in decoded content?


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] Base64 decoding

2013-02-08 Thread Lukas Gebauer
 Some compound characters aren't being displayed properly. The best way
 to explain it is with the function I use:

Maybe some UTF-8 encoding, or something similar? Or error after bad 
charset conversion? AFAIK it is not a base64 problem, just some 
charset issue.




-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] Base64 decoding

2013-02-08 Thread Lukas Gebauer
 OK so probably not much I can do about it other than what I have.
 Thanks for looking at it.

Try to send me a raw example of original message. Maybe I found what 
is wrong, or if it is Synapse bug.


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] OS/2 support for Synapse working (Was: Re: SSLConnect returning -1 but ErrGetError giving 0)

2013-02-05 Thread Lukas Gebauer
 Thanks again to Ludo who helped me to address the previously 
 discussed issue with SSL connections. Attached you'll find the result
 - my modifications (on top of Synapse trunk) allow compiling Synapse
 (or at least major parts ;-) ) for OS/2 and use the compiled units for
 both plain and SSL connections (using OpenSSL libraries compiled with
 EMX - in that case emx.dll is needed too, but only if OpenSSL support
 is included/compiled in the resulting binary). As of now, it requires
 unit Sockets (OS/2 implementation) from FPC trunk, but I'll probably
 merge the changes to the FPC fixes branch too.

I merged your work to main Synapse trunk as SVN revision #171.

Thank you!


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] Possible bug in TUDPBlockSocket.AddMulticast

2013-02-05 Thread Lukas Gebauer
 I encountered some problems with TUDPBlockSocket.AddMulticast on a win
 7 PC with more than one network interface (IP). Using 0.0.0.0 did
 not work as expected, so I had to bind one blocksocket per IP.

Fixed as SVN #172.

Thank you!


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] synadbg

2013-02-05 Thread Lukas Gebauer
 i'm trying to figure out how to use synadbg... it is something i have
 to specifically call with the public AppendToLog function or does it
 automatically engage for logging socket (and all other synapse??)
 debugging output? how does one enable synapse debugging output? i
 haven't found anything obvious :(

It implementing simple class functions what you can use as OnStatus 
and OnMonitor event handlers on your sockets. It log socket events to 
the file.



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] /etc/hosts

2013-02-05 Thread Lukas Gebauer
 using FPC Synapse seems to ignore /etc/hosts file, is there a way how
 to turn it on?

AFAIK it is used. Synapse using netdb.pp for name resolving. It try 
to call GetHostByName function and if it failed, then I call 
ResolveName function.



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] BUG REPORT - Mac OS - CRASH: Project xxx raised exception class 'External: SIGPIPE'

2013-02-05 Thread Lukas Gebauer
 It works great on Windows and Linux but crashed on Mac OS with the
 following error:
 
  Project xxx raised exception class 'External: SIGPIPE'

I use your solution on little different place - inside ssfpc.inc.

Thank you!



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] Small Issue with XE3

2013-02-05 Thread Lukas Gebauer
 When compiling Synapse (trunk 170) in RAD Studio XE3 with C++ Builder
 personality, errors are found in SynaUtil.pas where the macro
 DELPHIXE_UP is used. It appears that macro is not defined when
 compiling Delphi code with C++ Builder. This was not an issue in XE or
 XE2 because TimeSeparator was deprecated, but could still be used. In
 XE3, it is required to use FormatSettings.TimeSeparator, so the
 existing code fails. If you replace DELPHIXE_UP with COMPILER15_UP,
 the code will compile correctly in both Delphi and C++ Builder
 personalities.

Fixed as SVN #174.

Thank you!



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] bcb compatibility

2013-02-05 Thread Lukas Gebauer
 btw that series of $HPPEMIT under /* EDE 2003-02-19 */ comment isn't
 the best idea and probably should also be replaced with proper
 $externalsym directives

Since I am not BCB user, can you create proper version of 
sswin32.inc, please?

Thank you!


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] Mime - Split boundary markers

2013-02-05 Thread Lukas Gebauer
 Firstly they have split boundaries ie
 
 Content-Type: multipart/alternative;
  boundary*0==_35234942659e85d316a198bd=22834f06-ec61-5346-995f-07b0d5
 5bfb0;  boundary*1=c_=

It is https://tools.ietf.org/html/rfc2231

This RFC is not supported by Synapse yet.

 That was easy to fix

Your sample is simple. ;-) Look at more strange example:

   Content-Type: application/x-stuff
title*0*=us-ascii'en'This%20is%20even%20more%20
title*1*=%2A%2A%2Afun%2A%2A%2A%20
title*2=isn't it!

So, complex solution is needed.. and it is not easy.



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] Huge RAM usage on decoding MIME

2013-02-05 Thread Lukas Gebauer
 I discovered that for decoding 50MB MIME message (simple text with
 attachments), TMimeMess used 600-800MB of memory.

You have a 50MB message. By decomposing it is splitted into subparts 
objets. It need at leas additional 50MB.

Then you walk through subparts and do decoding of mime parts. It need 
next ~50MB. (depending on used encoding) And if it is text part, then 
you putting decoded text into FBody. If message is big text, then it 
need next ~50MB.

So, I see reason for 200MB allocation. You can save 50MB by clearing 
of FMimeMsg.MessagePart.Lines after decompose, if you not need it.

If you see 600-800MB allocation, then it must be some different 
issue, like memory fragmentation issue, or something else. Will be 
fine, if you can debug it by some memory management monitor tool. Or 
try to create some simple demo application, and I can try to debug it 
myself.



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] SNMP V2, 32 bits counters

2013-02-05 Thread Lukas Gebauer
 I think  there is an error in the library :
 asn1util.pas
 
 In  function ASNItem
 the var of y should be  y : int64; (not integer as the result could be
 more than 2147483647

It not was an error, because this library has no INT64 support yet. 
;-)

I made this support now. (SVN revision #175) Improved ASNItem and 
AsnEncInt.

Thank you.


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] client/server conflict?

2013-01-30 Thread Lukas Gebauer
 In the Synapse version of the clients, the only non-default value for
 TBlockSocket is ConnectionTimeout = 100.

Exists some special reason for 100ms connection timeout? It is too 
low!


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] Synapse 64bit

2013-01-30 Thread Lukas Gebauer
 I would like use your library Synapse in my 64bit application. Can
 Synapse support this architecture?

Use latest sources from the SVN repository. I made some fixes after 
latest release for Delphi x64 support.



-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] (Fwd) OS/2 support for Synapse working (Was: Re: SSLConnect returning -1 but ErrGetError giving 0)

2013-01-30 Thread Lukas Gebauer
 In particular, I wonder whether my contribution is considered for
 merging into Synapse SVN repository, or whether you see some issues
 with that. Sorry if it's just due to lack of time - I don't want to
 push it in any way so just tell me to wait more. Also, if my
 contribution is supposed to be provided through some other channel,
 just let me know too.

Sorry, I am just busy. But I have saved your contribution and I plan 
to merge it with Synapse. Thanks.


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] Synapse 64bit

2013-01-30 Thread Lukas Gebauer
  Please, when do you plan release new stable version? (with support
  x64 systems)
 Synapse works on 64-bit since many many years ?
 (at least using Free Pascal)

Yes, Freepascal x64 support exists long time ago. Latest x64 fixes 
are for Delphi XE2/3.




-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] SSLConnect returning -1 but ErrGetError giving 0 (Was: Re: error 500 with https??)

2012-12-07 Thread Lukas Gebauer
  Do you have an idea for a test which I could adapt to open a socket
  using Winsock and use/access it via standard BSD sockets afterwards
  (obviously, that test would need to use the respective sockets API
  rather than Synapse)?
 
 I haven't touched OS/2 since 1993 :) From your previous message, I
 learned that winsock is a compatibility layer. I'm just trying to ask
 the right questions to get more information on what is going wrong. As
 a test you could perhaps temporarily patch TBlockSocket.SendBuffer to
 use the bsd send instead of synsock.Send. If the handle is
 transparent, fetching a http page should just work.

Do not reinvent a wheel.

Synsock is just API functions layer between a Synapse and system 
sockets. TBlockSock.Handle is system socket handle. TBlockSock is 
just object based encapsulation of sockets API.

Synsock provide common socket interface for rest of Synapse units. It 
is implemented as direct winsock calls, or it calls related functions 
from the FreePascal's Sockets unit.

So, when somethink working fine with system socket API, no reason why 
it should not work with Synsock.


-- 
Lukas Gebauer.

http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
http://geoget.ararat.cz/ - Geocaching solution


--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


  1   2   3   4   5   6   >