Re: [twsocket] Memory leak in ICS Client socket

2011-07-01 Thread daniel cc

Thanks :)
I will check it out.

-daniel

-Original Message- 
From: Francois PIETTE

Sent: Friday, July 01, 2011 11:47 AM
To: ICS support mailing
Subject: Re: [twsocket] Memory leak in ICS Client socket

I am using TSSLWSocket and I would like to know why I get memory leak 
error while using the following at the “OnFormCreate”,


RecStream := TMemoryStream.Create;

Any ideas about what am I doin wrong?


At first, this is not related to ICS: If you create a memory stream or any
other object, then you must destroy it at some later point calling his Free
method or preferably using FreeAndNil(RecStream).

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Re: [twsocket] Unsupported OpenSSL

2011-06-26 Thread daniel cc

Hi Arno,
Thanks for the response :)
I have got it work.
I had wrong version of ICS components.

Best regards

-Original Message- 
From: Arno Garrels

Sent: Thursday, June 23, 2011 9:10 PM
To: ICS support mailing
Subject: Re: [twsocket] Unsupported OpenSSL

daniel cc wrote:

Hello,
I am hoping to get some help with this,
I have downloaded the latest SSL packages and installed to my system
and trying to make self-signed ceretificate and keys for the
component. I have made the keys and tested with the following error,

“Client exception occured: EIcsLibeayException: Unsupported OpenSSL
version (0x0090812F) !”


You get that Exception since your installed ICS version doesn't support this
OpenSSL library version.



Can someone pelase tell me what I need to update in order to be able
to make this work?

I have installed the Win32OpenSSL 0.9.8r


OpenSSL 0.9.8r is supported by ICS however not neccessarily by
the ICS version you currently use. All OpenSSL libraries available for
download at: http://wiki.overbyte.be/wiki/index.php/ICS_Download
are supported at least by  the latest ICS source code, also available for
download from that site. The OpenSSL Win64 versions are there for
future use.



My component version is not the latest and I perhaps need to update
my components as well but,
How can I uninstall the old components and install the latest
components?


In order to uninstall ICS goto Main menu | Component | Install Packages...
and remove the OverbyteIcs designtime package. In order to install ICS
follow the description in ReadMe7.txt.

--
Arno Garrels
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

[twsocket] Unsupported OpenSSL

2011-06-22 Thread daniel cc
Hello,
I am hoping to get some help with this,
I have downloaded the latest SSL packages and installed to my system and trying 
to make self-signed ceretificate and keys for the component.
I have made the keys and tested with the following error,

“Client exception occured: EIcsLibeayException: Unsupported OpenSSL version 
(0x0090812F) !”

Can someone pelase tell me what I need to update in order to be able to make 
this work?

I have installed the Win32OpenSSL 0.9.8r

My component version is not the latest and I perhaps need to update my 
components as well but,
How can I uninstall the old components and install the latest components?

I have done lot of work with my application and I simply can’t screw.

Thanks.
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

[twsocket] Latest supported SSL version

2011-06-22 Thread daniel cc
Hello,
can someone please inform,
what are the latest supported SSL packages and DLL files?
Where can I get them?

thank you.
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Latest supported SSL version

2011-06-22 Thread daniel cc

Thank you :)
Now everything works like charm..

-daniel

-Original Message- 
From: Francois PIETTE 
Sent: Wednesday, June 22, 2011 2:52 PM 
To: ICS support mailing 
Subject: Re: [twsocket] Latest supported SSL version 


can someone please inform,
what are the latest supported SSL packages and DLL files?
Where can I get them?


http://wiki.overbyte.be/wiki/index.php/ICS_Download

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] OverbyteIcsSimpleSslServer demo OpenSSL keys

2011-06-21 Thread daniel cc
Hi,
Could you please help me out with the SSL keys included in this demo?
I am trying to create my own self-signed certificate and keys with OpenSSL 
command prompt,
I can create 2048bit keys and the certification request and also the 
certification but I can’t make them work with this demo.

Demo has 3 files for the server,
1) 01cert.pem – can please someone clear me with this? because no matter what 
I do, I can’t create the similar, how can I create this?.
2) 01key.pem – this private key I can create and protect with password.
3) cacert.pem – this is I believe self-signed certificate right?

Now,
Do I need all 3 of these for the demo?

Client works with “01key.pem”,
can this key be,
1key/machine (means: every machine will have their own key)?
if yes,
how it is normally done?

Thanks in advance

-daniel
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

[twsocket] SSL server and CLient cert.

2011-06-15 Thread daniel cc
Hi,
I am using SSL server and SSL client in my application,
can someone please inform,
what are the commercial certificates for the component?

This may not be a question related to the component but,
I would like to hear your opinions.

Thanks in advance

-daniel
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] SSL server and CLient cert.

2011-06-15 Thread daniel cc

Hi,
Thanks for the response :)
I am so sorry :(, forgot to tell...
I am not using SSL for web communication, I am using the SSLServer and 
SSLClient for client to host connection.
I believe this has got nothing to do with Apache because there is no apache 
used.


I have been using demo server+client cert. delivered with component demo.

I would also like to ask,
Is it possible to use self made certs as told here?
are they safe?

http://acs.lbl.gov/~boverhof/openssl_certs.html

Thanks

-Original Message- 
From: Fastream Technologies

Sent: Wednesday, June 15, 2011 10:22 AM
To: ICS support mailing
Subject: Re: [twsocket] SSL server and CLient cert.

Anything that works for Apache would work since they use OpenSSL as well.

Regards,

SZ
On Wed, Jun 15, 2011 at 09:36, daniel cc dan...@signedsource.com wrote:


Hi,
I am using SSL server and SSL client in my application,
can someone please inform,
what are the commercial certificates for the component?

This may not be a question related to the component but,
I would like to hear your opinions.

Thanks in advance

-daniel
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] SSL server and CLient cert.

2011-06-15 Thread daniel cc

Okay,
Thanks a lot :)
I know the different between self made and not self made now.
How about recommendations?
can you guys recommend any commercial certs?
I plan to buy..

Thanks

-Original Message- 
From: Francois PIETTE

Sent: Wednesday, June 15, 2011 10:43 AM
To: ICS support mailing
Subject: Re: [twsocket] SSL server and CLient cert.


Anything that works for Apache would work since they use OpenSSL as well.



Thanks for the response :)
I am so sorry :(, forgot to tell...
I am not using SSL for web communication, I am using the SSLServer and 
SSLClient for client to host connection.
I believe this has got nothing to do with Apache because there is no 
apache used.


What SZ is saying is that Apache and ICS both use OpenSSL. So any
certificate OK for Apache is OK for OpenSSL and is OK for ICS.

You can also use OpenSSL comand line utility to convert certificates for
some format to other OpenSSL compatible format. I've done it to to convert a
certificate exported from IE.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Wiki article writing incentive idea

2011-06-15 Thread daniel cc

This would be a good idea..

-Original Message- 
From: Fastream Technologies 
Sent: Wednesday, June 15, 2011 10:46 AM 
To: ICS support mailing 
Subject: [twsocket] Wiki article writing incentive idea 


Hello Francois,

After observing your wiki with not much content for so long time, I have
come up with an idea. Why don't you open a use cases category where
developers can explain how they use ICS within their projects technically
and more fundemantally why they choose it. In return we should be given the
right to place links to our company web sites. If you look at our history
page at www.iqproxyserver.com/history.php , I have mentioned ICS there but
for technical writings your site is a better fit.

Best Regards,

SubZero
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] SSL server and CLient cert.

2011-06-15 Thread daniel cc

Thanks mate, very much appreciated :)

Just one more question,
If I am using ICS SSLServer and ICS SSLClients,
I do need the certificate for the server but do I need to buy the PEM file 
for the clients as well or how it goes?

What I know is,
Server needs CERT and client needs the PEM file as in my demo..

I think Comodo is good enough.

Thanks


-Original Message- 
From: Fastream Technologies

Sent: Wednesday, June 15, 2011 11:22 AM
To: ICS support mailing
Subject: Re: [twsocket] SSL server and CLient cert.

AFAIK Comodo is the cheapest one.
Regards,

SubZero
On Wed, Jun 15, 2011 at 11:11, daniel cc dan...@signedsource.com wrote:


Okay,
Thanks a lot :)
I know the different between self made and not self made now.
How about recommendations?
can you guys recommend any commercial certs?
I plan to buy..

Thanks

-Original Message- From: Francois PIETTE
Sent: Wednesday, June 15, 2011 10:43 AM

To: ICS support mailing
Subject: Re: [twsocket] SSL server and CLient cert.

 Anything that works for Apache would work since they use OpenSSL as well.





 Thanks for the response :)

I am so sorry :(, forgot to tell...
I am not using SSL for web communication, I am using the SSLServer and
SSLClient for client to host connection.
I believe this has got nothing to do with Apache because there is no
apache used.



What SZ is saying is that Apache and ICS both use OpenSSL. So any
certificate OK for Apache is OK for OpenSSL and is OK for ICS.

You can also use OpenSSL comand line utility to convert certificates for
some format to other OpenSSL compatible format. I've done it to to convert
a
certificate exported from IE.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] SSL server and CLient cert.

2011-06-15 Thread daniel cc

Hi Arno,
Thanks for the response.
Yes I do understand but,
looks like, I can't explain correctly.

My point is,
If I buy a certificate for the server,
I need to connect more than 5 clients to the same server.
Does this mean, I need to have 5 certificate or can I use 1 certificate 
which has 5 keys?


I hope it is clear this time..

Thanks

-Original Message- 
From: Arno Garrels

Sent: Wednesday, June 15, 2011 1:55 PM
To: ICS support mailing
Subject: Re: [twsocket] SSL server and CLient cert.

daniel cc wrote:

Thanks again,
can you please clear a bit up,
I understand the server certification but,


Do you realy?


where do I get the client key which is that PEM file?


Do you need/want client certificates? If so, the server
will have to verify client certificates during the SSL handshake
process.


Is it delivered with the certificate or should I buy that separately?


When you order a SSL certificate a matching key is created,
you always get a key along with your certificate otherwise a
certificate was useless.

Usually you buy a SSL server certificate. Its common name field is
the DNS name of the server. i.e. to smtp.gmail.com or www.microsoft.com.

If clients may connect from dynamic IP addresses a certificate
can neither be issued to an IP nor to a DNS name, hence rather
useless. In such case a good password is as secure as a client
certificate that i.e. has some ID in it's common name field.
And if both clients and server are under your control it is
not required to buy a certificate, just create your own CA
and certificates (server and client if you like).

--
Arno Garrels

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] SSL server and CLient cert.

2011-06-15 Thread daniel cc

Thank you very much :)
Now I got the whole picture.

Best regards

-Original Message- 
From: Arno Garrels 
Sent: Wednesday, June 15, 2011 2:43 PM 
To: ICS support mailing 
Subject: Re: [twsocket] SSL server and CLient cert. 


Arno Garrels wrote:

If clients may connect from dynamic IP addresses a certificate
can neither be issued to an IP nor to a DNS name, hence rather
useless. In such case a good password is as secure as a client
certificate that i.e. has some ID in it's common name field.


Not quite correct since a client certificate might be safer 
since the server will check client certificate's issuer.

However a client certificate including its key can be stolen or
given to some non-authorized third party.


And if both clients and server are under your control it is
not required to buy a certificate, just create your own CA
and certificates (server and client if you like).


And if you prefer GUI over command line tools have a look at
XCA (sourceforge.net) to manage you own CA.

--
Arno Garrels
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] SSL server and CLient cert.

2011-06-15 Thread daniel cc

Thanks Arno :)

-daniel

-Original Message- 
From: Arno Garrels 
Sent: Wednesday, June 15, 2011 3:40 PM 
To: ICS support mailing 
Subject: Re: [twsocket] SSL server and CLient cert. 


Arno Garrels wrote:

daniel cc wrote:

Hi Arno,
Thanks for the response.
Yes I do understand but,
looks like, I can't explain correctly.

My point is,
If I buy a certificate for the server,
I need to connect more than 5 clients to the same server.
Does this mean, I need to have 5 certificate or can I use 1
certificate which has 5 keys?


Clients do not need a certificate (and key) to be able to
connect to a SSL server.


Provided the server DOES NOT enforce client certificates
(as the German tax office server does).
Most servers don't. It is on your side how you set up the 
server.


And if you want client certificates do that with your own
CA, but do never ever send keys over the internet.
The client has to generate his private key locally and use
that to sign a certificate request. The certificate request
can be sent to the CA that will create the client certificate
and send it to the client. See OverbyteIcsX509Utils.pas
for a simple Delphi function to generate a key and a 
certificate request.


BTW: When you order a commercial certificate the key and 
certificate request are either created by an ActiveX or Java

browser plugin.

--
Arno Garrels   








I hope it is clear this time..

Thanks

-Original Message-
From: Arno Garrels
Sent: Wednesday, June 15, 2011 1:55 PM
To: ICS support mailing
Subject: Re: [twsocket] SSL server and CLient cert.

daniel cc wrote:

Thanks again,
can you please clear a bit up,
I understand the server certification but,


Do you realy?


where do I get the client key which is that PEM file?


Do you need/want client certificates? If so, the server
will have to verify client certificates during the SSL handshake
process.


Is it delivered with the certificate or should I buy that
separately? 


When you order a SSL certificate a matching key is created,
you always get a key along with your certificate otherwise a
certificate was useless.

Usually you buy a SSL server certificate. Its common name field is
the DNS name of the server. i.e. to smtp.gmail.com or
www.microsoft.com.

If clients may connect from dynamic IP addresses a certificate
can neither be issued to an IP nor to a DNS name, hence rather
useless. In such case a good password is as secure as a client
certificate that i.e. has some ID in it's common name field.
And if both clients and server are under your control it is
not required to buy a certificate, just create your own CA
and certificates (server and client if you like).

--
Arno Garrels

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Computer's name

2011-05-24 Thread daniel cc

Hi Francois,
I had to comeback to this issue,

I have understand that these 2 messages can be combined,

You can combine it when the message comes from the client. I don't see where
the problem is. Or maybe there is something I misunderstood.

Now,
Here are these 2 messages,
Client connected:|1| Remote:127.0.0.1:52541| Local:127.0.0.1:443
Received from:|127.0.0.1|Computer Name:|TROJAN.marketmedia.local|IP 
Address:|172.16.16.54|Language:|FIN|User name:|daniel cc|OS:|Windows 7 
Service Pack 1|Date  time:|24.05.2011 13:53:08'


First message Client connected comes when the client is connected
Second messageReceived from comes right after from the same client.

I might have difficulties of explaining this but,
I need to have both info into the xml file as info of one computer because 
it is info of one computer.

I can do all of that but what I can't do is,

I don't know how to make sure there won't be any other machines in between, 
I mean to make sure both data belongs to the same computer.


My question is,
How can I set both messages comes in the same time like one whole message or 
combine them by the server as one message?

Is there any ways of doing this?


Thanks in advance


-Original Message- 
From: Francois PIETTE

Sent: Wednesday, May 11, 2011 7:15 PM
To: ICS support mailing
Subject: Re: [twsocket] Computer's name



Your second message comes later and is available from the OnDataAvailable
event handler at server side.

Is it possible to send this at the same time as it connects?


No. The client can only send data when the TCP session is established and
your first message is generated at server side form TCP session information.


What I need is,
to combine both messages and get the ID and computer name.


You can combine it when the message comes from the client. I don't see where
the problem is. Or maybe there is something I misunderstood.



You should store this per client information in the TTcpSrvClient class
(just add new members as you need). As long a the connection is alive,
TTcpSrvClient class instance will hold any value you store in it. In all
events the client argument point to the same instance.

I am not sure if understand this but?
I have an xml which is kind of database where I would like to keep the 
computer data and refresh the data everytime I get the KEEPALIVE message 
from the client which will tell me that client is working. Client is 
sending the keepalive data by informing it's name and from the name I will 
know who is alive and who is dead.


It will be easier for me if I could just combine the messages and insert 
the data into the xml because I don't know how to store the data in 
clientclass.


In the ICS demos, there are examples. If I remeber well, the demo simply
record the datetime of connection.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Computer's name

2011-05-11 Thread daniel cc

Hi Francois,
Thanks for the response.
I have tested,
I can get the computer name if the computer is in the same network.

I can send any message including the computer name from the client when it 
connects.


Now,
First,
Server gives info of connected client with it's ip and the ID, the ID is 
very important for me because I need to use it for sending commands to the 
client.


Second,
Client sends a message where it tells it's name etc. when it is connected. I 
push client to send message to the server with lot of info.


What I would like to do is,
to combine these 2 messages together where I could get the ID and the 
computer name with all the other info I need from the client.

Is it any possible to do this?

I hope I have explained okay.


-Original Message- 
From: Francois PIETTE

Sent: Tuesday, May 10, 2011 7:00 PM
To: ICS support mailing
Subject: Re: [twsocket] Computer's name

We can get some remote info of the connected client from the following 
code but,

are there any possibilities of getting the computername as well?


Are you asking about Windows networking computername ? This is completly
independent of the TCP/IP protocol. It may even be different that the DNS
name associated with the computer's IP address.

if the remote computer is on the same LAN (or WAn transporting Windows
networking), then Windows API has function to enumerate computers on the
network (this is what Windows Explorer uses to show the network
neightborhood). You may use that API into your application.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Computer's name

2011-05-11 Thread daniel cc

Hi Francois,
I am building a server client application for monitoring few pc's which are 
in different locations(not the same network).
The ID what I am having is this one(tag:FClientNo), I get it when the client 
connects to the server.

--- C O D E 
procedure TfrmMain.SslWSocketServerClientConnect(Sender : TObject;
 Client : TWSocketClient;
 Error  : Word);
begin
   with Client as TTcpSrvClient do begin
   Inc(FClientNo); // Increment unique client no
   Tag := FClientNo; // tag connecting client with it's id
   Display('There is now ' +
   IntToStr(TWSocketServer(Sender).ClientCount) +
   ' clients connected.');
   Display('Client connected:|' +IntToStr(Tag)+ '|' +
   ' Remote:' +PeerAddr+ ':' +PeerPort+ '|' +
   ' Local:'  +GetXAddr+ ':' +GetXPort);

   LineMode:= True;
   LineEdit:= True;
   LineLimit   := 80; { Do not accept long lines }
   OnDataAvailable := ClientDataAvailable;
   OnLineLimitExceeded := ClientLineLimitExceeded;
   OnBgException   := ClientBgException;
   ConnectTime := Now;
   //You need to start inserting data into the xml here
   end;
end;
--- C O D E 

And this sends the info to the server (the client is sending), here is 
everything I need from the client and I can get lot more.

--- C O D E 
procedure TfrmMain.SslWSocketClientSessionConnected(Sender: TObject; 
ErrCode: word);

var
 Log: TextFile;
begin
 if Errcode  0 then
 begin
   memoDisplay.Lines.Add('Can''t connect, error #' + IntToStr(ErrCode));
 end
 else
 begin
   SslWSocketClient.SslEnable := True;
   SslWSocketClient.StartSslHandshake;
   tlbbtnConnect.Enabled := False;
   menuFileConnect.Enabled := False;
   menuFileDisconnect.Enabled := True;
   memoDisplay.Lines.Add('Connection established succesfully.');
 end;
 SslWSocketClient.SendStr('Computer Name:' + '|' + editComputerName.Text +
   '|' + 'IP Address:' + '|' + GetIPAddress + '|' + 'Language:' +
   '|' + GetWindowsLanguage + '|' + 'User name:' + '|' + UserInfo + '|' +
   'OS:' + '|' + SO + '|' + 'Date  time:' + '|' +
   FormatdateTime('dd.mm. hh:nn:ss', Now) + #13#10);
 stbMain.Panels[1].Text := 'System event lines: ' + 
IntToStr(memoDisplay.Lines.Count);

 {Writing events into the log}
 AssignFile(Log, ExtractFilePath(Forms.Application.ExeName) + 
'System\Log\system_log.txt');

 Append(Log); {Continue adding events into the log}
 {Add log events}
 Writeln(Log,memoDisplay.Text);
 CloseFile(Log);
end;
--- C O D E 

-Original Message- 
From: Francois PIETTE

Sent: Wednesday, May 11, 2011 2:28 PM
To: ICS support mailing
Subject: Re: [twsocket] Computer's name


I hope I have explained okay.


I do not grasp your complete architecture.
Which programs are you writing ? A server, a client, both ?
What is the ID you are talking about ?
Which protocol are you using ? You own ?

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Computer's name

2011-05-11 Thread daniel cc

Hi Francois,
Thanks for the response.


Your second message comes later and is available from the OnDataAvailable
event handler at server side.

Is it possible to send this at the same time as it connects?
What I need is,
to combine both messages and get the ID and computer name.


You should store this per client information in the TTcpSrvClient class
(just add new members as you need). As long a the connection is alive,
TTcpSrvClient class instance will hold any value you store in it. In all
events the client argument point to the same instance.

I am not sure if understand this but?
I have an xml which is kind of database where I would like to keep the 
computer data and refresh the data everytime I get the KEEPALIVE message 
from the client which will tell me that client is working. Client is sending 
the keepalive data by informing it's name and from the name I will know who 
is alive and who is dead.


It will be easier for me if I could just combine the messages and insert the 
data into the xml because I don't know how to store the data in clientclass.


-Original Message- 
From: Francois PIETTE

Sent: Wednesday, May 11, 2011 4:16 PM
To: ICS support mailing
Subject: Re: [twsocket] Computer's name


First,
Server gives info of connected client with it's ip and the ID, the ID is 
very important for me because I need to use it for sending commands to the 
client.


Second,
Client sends a message where it tells it's name etc. when it is connected. 
I push client to send message to the server with lot of info.


What I would like to do is,
to combine these 2 messages together where I could get the ID and the 
computer name with all the other info I need from the client.

Is it any possible to do this?


If I understand correctly, what you name your first message is not really a
message, it is just the event triggered at server side when a client is
connection to the server. At that time, the client has still not send
anything.

Your second message comes later and is available from the OnDataAvailable
event handler at server side.

You should store this per client information in the TTcpSrvClient class
(just add new members as you need). As long a the connection is alive,
TTcpSrvClient class instance will hold any value you store in it. In all
events the client argument point to the same instance.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] Computer's name

2011-05-10 Thread daniel cc
Hello,
I have now been thinking of this for a while and don’t know if I have already 
asked but here it comes,

We can get some remote info of the connected client from the following code but,
are there any possibilities of getting the computername as well?
if yes,
Please do help me out with it.

--[ C O D E 
]
{-| - [ Socket Client connect ] - |-}
procedure TfrmMain.SslWSocketServerClientConnect(Sender : TObject;
  Client : TWSocketClient;
  Error  : Word);
begin
with Client as TTcpSrvClient do begin
Inc(FClientNo); // Increment unique client no
Tag := FClientNo; // tag connecting client with it's id
Display('There is now ' +
IntToStr(TWSocketServer(Sender).ClientCount) +
' clients connected.');
Display('Client connected:|' +IntToStr(Tag)+ '|' +
' Remote:' +PeerAddr+ ':' +PeerPort+ '|' +
' Local:'  +GetXAddr+ ':' +GetXPort);

LineMode:= True;
LineEdit:= True;
LineLimit   := 80; { Do not accept long lines }
OnDataAvailable := ClientDataAvailable;
OnLineLimitExceeded := ClientLineLimitExceeded;
OnBgException   := ClientBgException;
ConnectTime := Now;
//You need to start inserting data into the xml here
end;
end;
--[ C O D E 
]
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Re: [twsocket] Bomb

2011-04-28 Thread daniel cc

Hi Francois,
Thanks for the response :)
Do I need to do anything, define anything?
I am using the SSL socket..

Thanks in advance

-Original Message- 
From: Francois PIETTE

Sent: Thursday, April 28, 2011 8:45 AM
To: ICS support mailing
Subject: Re: [twsocket] Bomb


Could someone please explain,
what this means?

Bomb('Add USE_SSL in the define section in project options');


The code in the unit where such line is included is intended to be compiled
using the USE_SSL symbol defined at the project level. The line is there to
trigger a compilation error should the user forgot to define the symbol.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Bomb

2011-04-28 Thread daniel cc

Hi Francois,
Thanks for the response.
How do I do this exactly?
I am not sure if understand what i need to do.

Thanks in advance

-Original Message- 
From: Francois Piette

Sent: Thursday, April 28, 2011 9:46 AM
To: ICS support mailing
Subject: Re: [twsocket] Bomb

You have to define use_ssl on your project option and rebuild all.
--
Envoyé de mon téléphone Android avec K-9 Mail. Excusez la brièveté.


daniel cc dan...@signedsource.com a écrit :

Hi Francois, Thanks for the response :) Do I need to do anything, define 
anything? I am using the SSL socket.. Thanks in advance -Original 
Message- From: Francois PIETTE Sent: Thursday, April 28, 2011 8:45 AM 
To: ICS support mailing Subject: Re: [twsocket] Bomb  Could someone please 
explain,  what this means?   Bomb('Add USE_SSL in the define section in 
project options'); The code in the unit where such line is included is 
intended to be compiled using the USE_SSL symbol defined at the project 
level. The line is there to trigger a compilation error should the user 
forgot to define the symbol. -- francois.pie...@overbyte.be The author of 
the freeware multi-tier middleware MidWare The author of the freeware 
Internet Component Suite (ICS) http://www.overbyte.be -- To unsubscribe or 
change your settings for TWSocket mailing list please goto 
http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website 
at http://www.overbyte.be -- To unsubscribe or change your
settings for TWSocket mailing list please goto 
http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website 
at http://www.overbyte.be


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Re: [twsocket] Bomb

2011-04-28 Thread daniel cc

Hi Francois,
I understand it now.
I didn't get the idea in the first place :(
I tought it should be somehow different and need to be placed in the code..

Sorry for the trouble.

Thanks a lot.


-Original Message- 
From: Francois PIETTE

Sent: Thursday, April 28, 2011 2:29 PM
To: ICS support mailing
Subject: Re: [twsocket] Bomb


You have to define use_ssl on your project option and rebuild all.



How do I do this exactly?
I am not sure if understand what i need to do.


Delphi menu / Project / Options / Delphi Compiler / Conditional Definitions
(May vary according to Delphi version)
then add USE_SSL after the existing if any.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] Bomb

2011-04-27 Thread daniel cc
Hi,
Could someone please explain,
what this means?

Bomb('Add USE_SSL in the define section in project options');

This is in the Server demo project.

thanks in advance
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Receive log file text

2011-04-13 Thread daniel cc

That's too bad.


-Original Message- 
From: Arno Garrels 
Sent: Tuesday, April 12, 2011 7:15 PM 
To: ICS support mailing 
Subject: Re: [twsocket] Receive log file text 


daniel cc wrote:

Thanks Arno :)
I understand perfectly,
Do we have any samples about this?


I do not think so.



About the file size,
the log file can be sometimes bigger than 3mb, does that makes
problem? it normally will be around 0-3mb


That's no problem, the filesize since D6/7 may be even greater
than 2 GB. It was limited to 2GB max in older Delphi versions 
since TStream did not use Int64.


--
Arno Garrels






-Original Message-
From: Arno Garrels
Sent: Tuesday, April 12, 2011 4:40 PM
To: ICS support mailing
Subject: Re: [twsocket] Receive log file text

daniel cc wrote:

Hi,
Can someone please help me out w ith a sample of how to,
send a log (text file) from client to the server?
My connection is with ICSSLServer and ICSSSLClient.


That works the same way as without SSL.
And it depends on your protocol.
Typically you send a request to the server telling him
that you want to send a file. The request would include
filename and filesize in bytes.
When the server received the request it opens an filestream,
turns off LineMode and sends back an OK-response or any error
code.
On receipt of the OK-response the client opens the file,
reads from it into a small buffer i.e. 4-16 KB and sends the
buffer content. The client sends subsequent data chunks
from event OnDataSent until the file is completely sent.
The server simply receives into a small buffer and writes
buffer content to the filestream until filesize has been
reached. The server turns on LineMode back again and sends
a response to the client telling him whether everyting
went well or some error occurred.

--
Arno Garrels

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] Receive log file text

2011-04-12 Thread daniel cc
Hi,
Can someone please help me out w ith a sample of how to,
send a log (text file) from client to the server?
My connection is with ICSSLServer and ICSSSLClient.

My client opens the connection and makes sure connection is always on.
Log file is just a regular text file and not so big.
I just need to receive the log file before closing restarting the client due 
the daily reboot routine.

thanks in advance.
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Receive log file text

2011-04-12 Thread daniel cc

Thanks Arno :)
I understand perfectly,
Do we have any samples about this?

About the file size,
the log file can be sometimes bigger than 3mb, does that makes problem?
it normally will be around 0-3mb



-Original Message- 
From: Arno Garrels 
Sent: Tuesday, April 12, 2011 4:40 PM 
To: ICS support mailing 
Subject: Re: [twsocket] Receive log file text 


daniel cc wrote:

Hi,
Can someone please help me out w ith a sample of how to,
send a log (text file) from client to the server?
My connection is with ICSSLServer and ICSSSLClient.


That works the same way as without SSL.
And it depends on your protocol. 
Typically you send a request to the server telling him

that you want to send a file. The request would include
filename and filesize in bytes. 
When the server received the request it opens an filestream,

turns off LineMode and sends back an OK-response or any error
code.
On receipt of the OK-response the client opens the file,
reads from it into a small buffer i.e. 4-16 KB and sends the
buffer content. The client sends subsequent data chunks 
from event OnDataSent until the file is completely sent.

The server simply receives into a small buffer and writes
buffer content to the filestream until filesize has been
reached. The server turns on LineMode back again and sends
a response to the client telling him whether everyting
went well or some error occurred.  


--
Arno Garrels

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] File transfer through SSL

2011-04-06 Thread daniel cc

Hi Francois,
Do we have any kind of demo project of how to upload stuff to the server by 
using ssl and how to download from the server?

This is something that I also very much would like to know about.

I have faced many times the following problem,
No one likes to open too many ports, if we could do anything over SSL port, 
that would be great.


Thanks in advance

-Original Message- 
From: Francois PIETTE

Sent: Tuesday, April 05, 2011 11:11 PM
To: ICS support mailing
Subject: Re: [twsocket] File transfer through SSL



You cannot communicate between clients. You must pass thru the server,
first upload the file from one client to the server and then download
the file from the server to the second client.

Or transform one client into a server (That is simply use ICS HTTPS
server component). But then you'll have issues with the firewall which
must forward the incomming connection to the client computer running the
server program.


But could it be possible to have an application that is server and client 
in the same time and for both operations use only one common port like 
port 80 ? Something like Skype does ?


Yes, no problem. You can have a server program listening on port 80 and on
the same computer a client program connecting to a server (local or remote)
on the port 80.

And instead of using HTTPS (SSL) use HTTP but with a custom encryption if 
needed. That's an idea, OK?


You can use HTTP protocol to transport any file, including encrypted files.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] File transfer through SSL

2011-04-06 Thread daniel cc

Thanks Francois :)
I will check them out.



-Original Message- 
From: Francois PIETTE 
Sent: Wednesday, April 06, 2011 2:36 PM 
To: ICS support mailing 
Subject: Re: [twsocket] File transfer through SSL 

Do we have any kind of demo project of how to upload stuff to the server 
by using ssl and how to download from the server?

This is something that I also very much would like to know about.


You have two demos: client (OverbyteIcsHttpsTst.dproj) and server 
(OverbyteIcsHttpsServer). Both are located under ics install 
dir\Delphi\SslInternet


--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] OT: Windows 7/20008R2 SP1 now available

2011-02-17 Thread daniel cc

Thanks Angus :)


-Original Message- 
From: Angus Robertson - Magenta Systems Ltd 
Sent: Thursday, February 17, 2011 11:44 AM 
To: twsocket@elists.org 
Subject: [twsocket] OT: Windows 7/20008R2 SP1 now available 


For those with MSDN, Partner Action Pack or Technet accounts, service
Pack 1 for Windows 7 and 2008R2 is now available from Technet downloads,
1.9 gigs for the DVD version, or full OSs with SP1 added. 


https://technet.microsoft.com/en-gb/subscriptions/securedownloads/default.
aspx

Angus


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] TWSocketServer TWSocketClient send receive files

2011-02-14 Thread daniel cc
Hello,
Can someone please guide me to a correct demo/sample of how to send  receive 
files?

thanks in advance
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TWSocketServer TWSocketClient send receive files

2011-02-14 Thread daniel cc

Thanks Francois,
I probably need to get into this abit more.
I have some more details..

What about file metadata such as filename and timestamp ?
What about permissions to access the file at sender side and to write the
file at receiver side ?

-- I actualy think I could handle it on the both sides very easyly because,
Upload from client to the server (log files only which are .txt) with an 
automated process such as client will send the log file when it is asked by 
the server like,
server sends command: getlogfile and client answers by sending the log file 
into a prefixed directory placed in the server with a prefixed name.
Server sends an update file which is prefixed name such as setup.exe and 
client will save it into a prefixed directory placed in the client with a 
prefixed name.
Everything will be done hidden at the background with no user attantion 
required.


FTP, HTTTP, SMTP/POP3, NNTP are all capable of transmit file and they are
standard protocols based on TCP sockets.
You may also design your own protocol based on your own requirements which
are...
-- I actualy have the protocol which is just the command based and 
everything works real good and smooth but sending and receiving files is 
once more something which I don't know if possible to do in the same way.
Like: Server sends command: Get me the log file and client answers by 
sending the file, or server sends the setup.exe file and client responds by 
installing it.



--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TWSocketServer TWSocketClient send receive files

2011-02-14 Thread daniel cc

Thank you :)
Just what wanted to hear.

With best regards

-Original Message- 
From: Francois PIETTE

Sent: Monday, February 14, 2011 2:19 PM
To: ICS support mailing
Subject: Re: [twsocket] TWSocketServer  TWSocketClient send receive files


FTP, HTTTP, SMTP/POP3, NNTP are all capable of transmit file and they are
standard protocols based on TCP sockets.
You may also design your own protocol based on your own requirements which
are...
-- I actualy have the protocol which is just the command based and 
everything works real good and smooth but sending and receiving files is 
once more something which I don't know if possible to do in the same way.


You can easily add file transfer to your protocol. For example, you
implement a command file taking as argument the file size, filename and
timestamp (UTC). Then the sender read the file block by block and send
exactly the number of byte, then the command is finished. At receiver side,
whe the file command is received, the receiver parse file size, timestamp
and file namne, then switch linemode to off and wait the receive exatcly
filesize bytes, save it in the given file (or stream) and then switch back
linemode to on and send some OK message to the sender. Basically this is
more or less how http 1.1 is working.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Error with SSLWSocketClient

2011-02-07 Thread daniel cc

Hi Arno,
Thanks for your precise comments.
The security issue in my case is not very high because this is just a server 
client communication with nothing sensetive (no money transfer or credit 
cards or personal info etc.)
I will use a commercial Certificate of 3 years valid and hoping that it will 
work.


However,
I still can't find the reason why I have got that error.
Are you saying that there is security leak in ICS?
if yes,
do we have any solutions for it?

thanks

-Original Message- 
From: Arno Garrels

Sent: Sunday, February 06, 2011 10:34 PM
To: ICS support mailing
Subject: Re: [twsocket] Error with SSLWSocketClient

Arno Garrels wrote:


With OpenSSL it's easy to generate a CRL and to include its weblink
in self created certificates. If you will use commercial SSL server
certificates you do not have to worry about CRLs.


Well that's true, however currently ICS lacks the CRL-feature. It does 
neither
include local  CRLs in the certificate verification process nor follow 
external
CRL-links in certificates. This is a security leak, however not  just in 
ICS. I'm

not aware of any Delphi SSL-Component suite that handles CRLs correctly,
one should know that if high security matters.

--
Arno Garrels
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Error with SSLWSocketClient

2011-02-03 Thread daniel cc

Angus,
I remember all you said.
As mentioned,
I am still running tests.
What I need is a some kind of explanation about the error since I am not 
using IE or Mozilla.

Do you know the reason for the error?




-Original Message- 
From: Angus Robertson - Magenta Systems Ltd

Sent: Thursday, February 03, 2011 10:07 AM
To: twsocket@elists.org
Subject: Re: [twsocket] Error with SSLWSocketClient


I have received an error from my client on test,
the error is,
_Revocation information for the security certificate for this site
is not available, do you want to proceed?_



I am using the demo/test certificates delicered with ICS component
package because I am still doing a test period.


Don't use demo certificates, generate your own test SSL certificates for
the servers and maybe the clients.  When you go live, you'll need to buy
commercial SSL/TLS certificates, which may be expensive.

And read the SSL/TLS book as suggested several weeks ago.

Angus

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Error with SSLWSocketClient

2011-02-03 Thread daniel cc

Guys,
The certificate is not expired because I have checked it.


-Original Message- 
From: Fastream Technologies 
Sent: Thursday, February 03, 2011 10:49 AM 
To: ICS support mailing 
Subject: Re: [twsocket] Error with SSLWSocketClient 


SSL certificates expire after a period of time--usually 1 year.

Regards,

SZ
On Thu, Feb 3, 2011 at 10:49 AM, daniel cc dan...@signedsource.com wrote:


Angus,
I remember all you said.
As mentioned,
I am still running tests.
What I need is a some kind of explanation about the error since I am not
using IE or Mozilla.
Do you know the reason for the error?




-Original Message- From: Angus Robertson - Magenta Systems Ltd
Sent: Thursday, February 03, 2011 10:07 AM
To: twsocket@elists.org
Subject: Re: [twsocket] Error with SSLWSocketClient


I have received an error from my client on test,

the error is,
_Revocation information for the security certificate for this site
is not available, do you want to proceed?_



I am using the demo/test certificates delicered with ICS component

package because I am still doing a test period.



Don't use demo certificates, generate your own test SSL certificates for
the servers and maybe the clients.  When you go live, you'll need to buy
commercial SSL/TLS certificates, which may be expensive.

And read the SSL/TLS book as suggested several weeks ago.

Angus

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Error with SSLWSocketClient

2011-02-03 Thread daniel cc

Hi Arno,
Thanks for the response.
I am running the test with plain -- OverbyteIcsSimpleSslServer project demo 
which I have modified a bit (such as keepalive, error handling etc.).
I do use firefox in the client machine but that is not part of my 
application it is just the firefox for web use (downloading drivers etc.).


-Original Message- 
From: Arno Garrels

Sent: Thursday, February 03, 2011 10:57 AM
To: ICS support mailing
Subject: Re: [twsocket] Error with SSLWSocketClient

daniel cc wrote:

Hello,
I have received an error from my client on test,
the error is,
“Revocation information for the security certificate for this site is
not available, do you want to proceed?”


This is not an error from your application, isn't it?
A certificate usually contains a link to a certificate revocation list 
CRL.

When Windows or Firefox verify a certificate they try to lookup
the presented certificate in that list. Applications may show that warning
if there's no link to a CRL included etc..



Please notice,
I am using the demo/test certificates delicered with ICS component
package because I am still doing a test period. I just would like to
know if someone else has the problem and what is the solution?


With OpenSSL it's easy to generate a CRL and to include its weblink
in self created certificates. If you will use commercial SSL server 
certificates

you do not have to worry about CRLs.

--
Arno Garrels

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Re: [twsocket] Error with SSLWSocketClient

2011-02-03 Thread daniel cc

Angus,
I wouldn't type here and bother anyone if I could have found the answer from 
the book.
So far I couldn't find the answer from the book, chapters 70-73 tells many 
things but nothing about this particular error.
I have googled much and the answer everywhere seems to be managing the 
browser settings and I am wondering...

What this error got to do with the browser which isn't used.

one more thing,
Please don't answer to my questions, if you don't have the answer.
I have some brain which may not be as big as yours but I  do know how to use 
it for looking in the book or the internet.
There are always things which aren't in the books and I believe you also 
know that.




-Original Message- 
From: Angus Robertson - Magenta Systems Ltd

Sent: Thursday, February 03, 2011 11:41 AM
To: twsocket@elists.org
Subject: Re: [twsocket] Error with SSLWSocketClient


What I need is a some kind of explanation about the error since I
am not using IE or Mozilla.
Do you know the reason for the error?


Read Appendix B in the SSL and TLS Essentials book and pages 70 to 73 in
the Network Security with OpenSSL book.

This mailing list is not for basic teaching, it is for support of the
TWSocket components.

Angus

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] Error with SSLWSocketClient

2011-02-02 Thread daniel cc
Hello,
I have received an error from my client on test,
the error is,
“Revocation information for the security certificate for this site is not 
available, do you want to proceed?”

Please notice,
I am using the demo/test certificates delicered with ICS component package 
because I am still doing a test period.
I just would like to know if someone else has the problem and what is the 
solution?

Thanks
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Re: [twsocket] Error handling

2011-01-31 Thread daniel cc

HI Francois,
Could you please clear me up a bit,

procedure --Where should I use for the right result in order to be able to 
catch the error into the memo (in which procedure: OnBgException or)?

begin
 if ErrCode = 0
   then Display.Lines.Add('Job done')
   else Display.Lines.Add(SslWSocketClient.WSocketErrorDesc(ErrCode));
end;

Thanks

-Original Message- 
From: Francois PIETTE

Sent: Monday, January 31, 2011 11:39 AM
To: ICS support mailing
Subject: Re: [twsocket] Error handling


There camed up a little pop-up saying Socket error 10052
This camed up when I pulled the network cable off (testing in windows xp 
professional).


Sorry, I had not seen it. I don't think the little pop-up is part of ICS.
ICS trigger exception and that is what is useful.

Could you please correct me if any of these is wrong (trying to find out 
socket states for log events)?


This is OK but error prone because there could be a change in the code in a
future version.

Also have a look at WSocketErrorDesc().

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be


- Original Message - 
From: daniel cc dan...@signedsource.com

To: ICS support mailing twsocket@elists.org
Sent: Monday, January 31, 2011 8:54 AM
Subject: Re: [twsocket] Error handling



Sorry Francois,
I tought I had it in the previous mail.

Here it is,
There camed up a little pop-up saying Socket error 10052
This camed up when I pulled the network cable off (testing in windows xp 
professional).


However,
I have just tested again with this and the error is gone but I still would 
very much like to catch the errors and put them into the log. For that I 
very much need some samples.
procedure TfrmMain.SslWSocketClientBgException(Sender: TObject; E: 
Exception;

 var CanClose: Boolean);
begin
 CanClose := True;
 Display.lines.Add('Connection terminated');
end;


Could you please correct me if any of these is wrong (trying to find out 
socket states for log events)?

/
const
aSocketState: array[TSocketState] of string = (
 'Invalid',   'Opened',
 'Bound', 'Connecting',
 'Connected', 'Accepting',
 'Listening', 'Closed', 'Closing');
/


-Original Message- 
From: Francois PIETTE

Sent: Monday, January 31, 2011 9:08 AM
To: ICS support mailing
Subject: Re: [twsocket] Error handling

Daniel,

You have not answered my question: What is the exception/error which is
generated ?

One we know which error/exception is killing you, we'll probably be able 
to

give a better idea.
OnBgException handle background exceptions, that is exceptions triggered 
in

the message pump and not handled elsewhere. You can also have exception
anywhere you call an ICS method and you catch it with a try/except. But
usually there is no such exception unless you've made a programming error 
or

miunderstood some concept. So plese tell us what exception/error you
have !

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be


- Original Message - 
From: daniel cc dan...@signedsource.com

To: ICS support mailing twsocket@elists.org
Sent: Monday, January 31, 2011 7:46 AM
Subject: Re: [twsocket] Error handling



Hello,
Thanks for the response.
Sorry for delay.

Do we have any demos where -- OnBgException is handled?
I simply can't find any, in the server or the client demos.
I have tryed to set Can Close and put the error into the memo with no 
success.
All I need is to avoid the error pop-up and put the error into the 
memo/log file.


If anyone has ever done this,
could you please post some example of how it is done or can be done.

Thanks

-Original Message- 
From: Francois PIETTE

Sent: Thursday, January 27, 2011 10:51 PM
To: ICS support mailing
Subject: Re: [twsocket] Error handling

Can someone please guide me to a demo where the ICS Socket errors are 
handled?
I have checked almost all and each one of them are having some handling 
but I can’t get the result I need.


Example: If I pull the network cable from the client I get socket error 
pop-up

which is something that I wouldn’t like to see.


What is the exception/error which is generated ?

See OnBgException event.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Re: [twsocket] Error handling

2011-01-30 Thread daniel cc

Hello,
Thanks for the response.
Sorry for delay.

Do we have any demos where -- OnBgException is handled?
I simply can't find any, in the server or the client demos.
I have tryed to set Can Close and put the error into the memo with no 
success.
All I need is to avoid the error pop-up and put the error into the memo/log 
file.


If anyone has ever done this,
could you please post some example of how it is done or can be done.

Thanks

-Original Message- 
From: Francois PIETTE

Sent: Thursday, January 27, 2011 10:51 PM
To: ICS support mailing
Subject: Re: [twsocket] Error handling

Can someone please guide me to a demo where the ICS Socket errors are 
handled?
I have checked almost all and each one of them are having some handling 
but I can’t get the result I need.


Example: If I pull the network cable from the client I get socket error 
pop-up

which is something that I wouldn’t like to see.


What is the exception/error which is generated ?

See OnBgException event.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Re: [twsocket] Error handling

2011-01-30 Thread daniel cc

Sorry Francois,
I tought I had it in the previous mail.

Here it is,
There camed up a little pop-up saying Socket error 10052
This camed up when I pulled the network cable off (testing in windows xp 
professional).


However,
I have just tested again with this and the error is gone but I still would 
very much like to catch the errors and put them into the log. For that I 
very much need some samples.
procedure TfrmMain.SslWSocketClientBgException(Sender: TObject; E: 
Exception;

 var CanClose: Boolean);
begin
 CanClose := True;
 Display.lines.Add('Connection terminated');
end;


Could you please correct me if any of these is wrong (trying to find out 
socket states for log events)?

/
const
aSocketState: array[TSocketState] of string = (
 'Invalid',   'Opened',
 'Bound', 'Connecting',
 'Connected', 'Accepting',
 'Listening', 'Closed', 'Closing');
/


-Original Message- 
From: Francois PIETTE

Sent: Monday, January 31, 2011 9:08 AM
To: ICS support mailing
Subject: Re: [twsocket] Error handling

Daniel,

You have not answered my question: What is the exception/error which is
generated ?

One we know which error/exception is killing you, we'll probably be able to
give a better idea.
OnBgException handle background exceptions, that is exceptions triggered in
the message pump and not handled elsewhere. You can also have exception
anywhere you call an ICS method and you catch it with a try/except. But
usually there is no such exception unless you've made a programming error or
miunderstood some concept. So plese tell us what exception/error you
have !

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be


- Original Message - 
From: daniel cc dan...@signedsource.com

To: ICS support mailing twsocket@elists.org
Sent: Monday, January 31, 2011 7:46 AM
Subject: Re: [twsocket] Error handling



Hello,
Thanks for the response.
Sorry for delay.

Do we have any demos where -- OnBgException is handled?
I simply can't find any, in the server or the client demos.
I have tryed to set Can Close and put the error into the memo with no 
success.
All I need is to avoid the error pop-up and put the error into the 
memo/log file.


If anyone has ever done this,
could you please post some example of how it is done or can be done.

Thanks

-Original Message- 
From: Francois PIETTE

Sent: Thursday, January 27, 2011 10:51 PM
To: ICS support mailing
Subject: Re: [twsocket] Error handling

Can someone please guide me to a demo where the ICS Socket errors are 
handled?
I have checked almost all and each one of them are having some handling 
but I can’t get the result I need.


Example: If I pull the network cable from the client I get socket error 
pop-up

which is something that I wouldn’t like to see.


What is the exception/error which is generated ?

See OnBgException event.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Re: [twsocket] TWSocketServer and TWSocket Port

2011-01-27 Thread daniel cc

So, leave SSL apart for now.


I don't see any reasons to leave the SSL because I already spent 3 weeks 
with making lot of tests and have learned much about SSL and I will 
continue.
I am also hoping that you guys try to understand my approach instead of 
asking to leave it.

SSL is good enough for me as Arno also has convinced me about it.
If I can figure out few things than I will have no problems of doing my 
project to the end because I am already very close to it.


My feel is that your knowledge of the
Delphi language itself is very limited,  and this is not the right place
to learn it.


This is something which isn't easy to tell about what is the limited 
knowledge.
Every programmer is good in some fields and the network communication is not 
mine.


It was been explained to you already, more than one time.



You probably have which I haven't understand i bit of it.
Explaining is one thing and understanding is another.
And expecting that everything is as simple as you have explained and 
expecting that the person is capable of understanding exactly what you are 
saying is also another thing.


Everything will work perfectly when you guys stop treating me as a guru and 
try to give me samples of what can be done and how it can be used.

Please MARK ON THIS!!
I am not asking anyone to write code for me, I can do that myself.
All I am asking is explain it with a sample of what can be  done and how can 
be done, guide me to the samples, guide me to the direction.
I am most of the time getting one explanation and 4 different directions 
such as yours telling me to use something else than what I am trying to do.


And.
Please let's quit this here and continue to some other subjects. 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TWSocketServer and TWSocket Port

2011-01-27 Thread daniel cc

SOLVED!!

-Original Message- 
From: daniel cc

Sent: Thursday, January 27, 2011 7:33 PM
To: ICS support mailing
Subject: Re: [twsocket] TWSocketServer and TWSocket Port

So, leave SSL apart for now.



I don't see any reasons to leave the SSL because I already spent 3 weeks
with making lot of tests and have learned much about SSL and I will
continue.
I am also hoping that you guys try to understand my approach instead of
asking to leave it.
SSL is good enough for me as Arno also has convinced me about it.
If I can figure out few things than I will have no problems of doing my
project to the end because I am already very close to it.

My feel is that your knowledge of the
Delphi language itself is very limited,  and this is not the right place
to learn it.



This is something which isn't easy to tell about what is the limited
knowledge.
Every programmer is good in some fields and the network communication is not
mine.

It was been explained to you already, more than one time.



You probably have which I haven't understand i bit of it.
Explaining is one thing and understanding is another.
And expecting that everything is as simple as you have explained and
expecting that the person is capable of understanding exactly what you are
saying is also another thing.

Everything will work perfectly when you guys stop treating me as a guru and
try to give me samples of what can be done and how it can be used.
Please MARK ON THIS!!
I am not asking anyone to write code for me, I can do that myself.
All I am asking is explain it with a sample of what can be  done and how can
be done, guide me to the samples, guide me to the direction.
I am most of the time getting one explanation and 4 different directions
such as yours telling me to use something else than what I am trying to do.

And.
Please let's quit this here and continue to some other subjects.

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] Error handling

2011-01-27 Thread daniel cc
Hello,
Can someone please guide me to a demo where the ICS Socket errors are handled?
I have checked almost all and each one of them are having some handling but I 
can’t get the result I need.

Example: If I pull the network cable from the client I get socket error pop-up 
which is something that I wouldn’t like to see.
I would like to handle the errors into the log file and read them if needed.
Please notice,
I don’t need help for putting errors into the log file, I just need to know 
about how the errors are handled best in the socket components.

Thanks in advance
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

[twsocket] TWSocketServer and TWSocket Port

2011-01-26 Thread daniel cc
Hello all,

If I have server and client component at one side,
server and client component at the other side

Side A: TWSocketServer and TWSocket == Acts as client
Side B: TWSocketServer and TWSocket == Acts as server

Side A connects automatically to the site B because site A is acting as client 
and site B is acting as Server.

Now,
Site B which is the server needs to have port 443 open (I am using SSL sockets 
in both sites) in order to be able to receive the client (site A).
When the site A connects to the site B it informes ip and the port,
can this informed port be used for connecting from site B to the site A (like 
reverse)?

Here is the goal,
I want to be able to avoid opening the ports at site A, I would like to use the 
same port which the site A uses when it connects to the site B.

Could you please let me know if this is possible with SSL components?

thanks
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TWSocketServer and TWSocket Port

2011-01-26 Thread daniel cc
I would like to use the same port which the site A uses when it connects 
to the site B.


Yes, you can have a same listening port at both sides.



Thanks for the response.
Yes,
I know I can listen same ports but my question is,
can I do that at Site A without opening any ports at the 
routers/firewalls?


The goal is to have ports open only at site B which is the server.

I am I am explaining this correct.

Thanks



--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TWSocketServer and TWSocket Port

2011-01-26 Thread daniel cc

The use only one socket and make all communications over that unique
connection. No other choise in your situation.




Thanks Francois,
Please do correct me if I am wrong.

Now,
You are saying that it is not possible to have only server port opened, I 
need to open port 443 in both sites.

Site A port 443 need to be open from PC and from the firewall.
Site B port 443 need to be open from PC and from firewall.

If this is correct than,
means there are no options to reverse the communication between the sockets 
and also means the client pc cannot be accessed in any ways.

Means also,
I cannot run remote client windows Command prompt from the server.
Means also,
I cannot use WMI to collect the client system info or modify the client 
system info.


I am just hoping that I am totally wrong!!




--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TWSocketServer and TWSocket Port

2011-01-26 Thread daniel cc



(I am using SSL sockets in both sites)


Why you insist in use SSL if the client and server applications are
coded by you?!! Why use a standard that only exist because of the need
to connect many different implementations of clients to many different
implementations of servers?
You will be much more secure if you encode your data, with your own
method, using a much more powerful encrypt algorithm than the used by
SSL. And you even get ride of third-party code, such as the OpenSSL DLLs.
--

I Insist because I have no other options because I don't have knowledge of 
doing it in the other way.

Is that clear enough for you?


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TWSocketServer and TWSocket Port

2011-01-26 Thread daniel cc

Thanks Arno,
Your answer is just a music to my ears :)


RTT wrote:

(I am using SSL sockets in both sites)


Why you insist in use SSL if the client and server applications are
coded by you?!! Why use a standard that only exist because of the need
to connect many different implementations of clients to many different
implementations of servers?
You will be much more secure if you encode your data, with your own
method, using a much more powerful encrypt algorithm than the used by
SSL. 


SSL/TLS aktually uses common, powerful and strong encryption algorithms.  
However secure peer to peer communication is much more than just that.
SSL security includes, for instance, peer verification and protects 
against Man in the Middle attacks. 
--

Arno Garrels





--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TWSocketServer and TWSocket Port

2011-01-26 Thread daniel cc

RTT,
First,
I am not building a bank system where I would need extremely high security.
It is a very simple monitoring system.
SSL is okay for this as far as I am concerned.

You may be right or may not.
For me the mosty important here is to learn one thing at a time.

If I listen you,
I have to start learning something else also. Your way of handling is not 
going to help me to understand the ICS sockets better it will make things 
more complicated and difficult.


A question,
Would you help me with few code examples if I do exactly what you are 
saying?

No!!
I didn't think so.

My motto is,
If you aren't gonna help,
don't bother because I already have got too many ideas and ways to use as 
the blowfish which you are talking about is one of them.
Right now, I don't need ideas which makes things more difficult and 
complicated, I only need help for learning the ICS socket communication.


If you really want to help me,
Post me few examples (don't explain) of how to?
- Send command to the client socket by using it's computer name
- Recieve WMI information from the client socket == I am not asking you to 
help with WMI, I can do it myself, all I need is how to connect to WMI from 
server socket to the client socket and receive the data.
- How to handle the errors of sockets (example: if client loses the 
connection it gives error in the window, how this can be handled in the 
sockets).


This samples could be uploaded to the ICS component site where every starter 
would have possibility to use them as help source.


Thanks

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] CMD via ICS SslWSocketServer to ICS SslWSocket

2011-01-24 Thread daniel cc
Hello,
When the WSocket is connected to the WSocketServer, I know it is possible to 
send commands to the client socket.

Now,
I have build a custom CMD with TEdit, TMemo and a button which can input 
commands into the system CMD.EXE (run commands directly in my application).

My question is,
is it possible to run the remote client CMD in the same way?
I mean,
when the client is connected,
I could run the command prompt of the connected client and put commands via my 
command window behind the WSocketServer.

Did anyone ever done this with ICS?
if yes could you please light me up?
I am working with SslWSocketServer and SslWSocket, everything works great, so 
far I have managed building the pem files and certification etc.

I don’t know how good I have explained this, please do ask if the explanation 
isn’t clear.

Thanks
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Re: [twsocket] FTPCli problem.

2011-01-23 Thread daniel cc

Hi Antol,
I am using a ICS built ftp client which has been several times updated and
worked very good.
I don't know if this is any help but,
I had problems with 2 different models of D-Link routers and had to change
them because my app did work in everywhere else but not in the machines
behind of D-Link routers.
That was exactly the Passive mode problem I unfortunately don't remember
the errors anymore.

I believe you will be able to find the problem if you switch D-Link router
with something else.

-Original Message- 
From: Antol

Sent: Monday, January 24, 2011 7:11 AM
To: ICS support mailing
Subject: Re: [twsocket] FTPCli problem.

Hello Arno,

Sunday, January 23, 2011, 10:09:00 PM, you wrote:

AG Antol,

AG We realy need a reproducible test case. I searched the source
AG again but was not able to find a change that could lead to the
AG problem. Double check that you use latest ICSv7 from:
AG http://wiki.overbyte.be/wiki/index.php/ICS_Download

AG My OverbyteIcsFtpCli.pas is V7.17

No, it is V7.12. I downloaded it with this pack:
Download ICS-V7 Distribution (October, 2010)
http://www.overbyte.be/frame_index.html?redirTo=/products/ics.html


Now I looked more carefully and found daily sources archive with 7.17.
I'll try it and let you know if there are any changes.

Additional info from the user:
Note:  2.20  uses  ICS5,  2.30 uses ICS7, TEM is The Evil Machine that
doesn't work in passive mode.

==
Still, 2.20 in passive mode worked--and still works--from TEM but 2.30 in 
passive mode does not.  That is most curious.  Yes, routers are not very 
consistent, which I well understand.  But, between 2.20 and 2.30 on TEM the 
router does not change nor does the operating system... only the 
software changes.
Even stranger still is that passive mode was developed to resolve a NAT 
issue.  Testing any particular router by using active and then passive mode, 
it would be more likely active mode would fail.  (The TEM router is, by the 
way, an old D-Link DIR-624 which was sold in UK not US.)

==




--
Best regards,
Antolmailto:spama...@mail.ru

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] SslWSocket client KeepAlive

2011-01-20 Thread daniel cc
Hello,
What are the right parameters of the component for keeping the client alive,
1) KeepAliveInterval = ?
2) KeepAliveOnOff   = ?
3) KeepAliveTime = ?

What I would like to know is,
What do you normally use and what is the best?

Do you keepalive the connection by pinging the host or send messages let’s say 
every 5 minutes, how you keep it alive?

Thanks
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Re: [twsocket] SslWSocket client KeepAlive

2011-01-20 Thread daniel cc

Thanks Angus,
I now your answers of yesterday but,

What are these for?
1) KeepAliveInterval = ?
2) KeepAliveOnOff   = ?
3) KeepAliveTime = ?
Are they there for what?

Do we have any samples of keepalive?
or do I just have to figure out how?

I have never done anything like this before and looks like I won't be able 
of doing anything with out samples :(

How the packet send is usualy done in ICS?

I need samples!

Thanks

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] SslWSocket client KeepAlive

2011-01-20 Thread daniel cc

Have you tried searching all the ICS files, you will find it is used.
Or use Goggle, this is simple TCP programming, nothing specific to ICS.



Yes, I did and plenty of it.
There are none documents which tells about how to in ICS and there are very 
few for Winsock.




I won't be able of doing anything with out samples :(


If you want other people to write your programmes for you, you'll need to
come to a commercial arrangement with them.


Making a sample code of a procedure is not making the program it is just a 
guide for where to start and how to start.
A sample code is just what I need in order to be able to understand these 
things.

A clear guide which tells about,
If you need to send packets  for keeping alive put the code into the 
procedure  etc.

Overbyte Wiki has very little info to use.

If you thinks I am looking for a ready made application,
means I have explained myself exremely badly!!

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] SslWSocketServer GET REMOTE COMPUTER NAME

2011-01-20 Thread daniel cc

Thanks Francois,
Your answer makes the ComputerName issue easier for me.

The network will be controlled. Users won't be able to use duplicated names 
on their computers.


I have asked because  I have found -- GetPeerName in the component and 
wondering if possible.


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] SslWSocketServer and SslWSocket KEEPALIVE

2011-01-19 Thread daniel cc
Hi guys,
Could you please inform,
What is the best way to use in order to be able to keep alive both server and 
client?
I would like to keep them both alive.

Is it custom? or systemon? or off?
How about interval?

Thanks

-daniel
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] SslWSocketServer and SslWSocket KEEPALIVE

2011-01-19 Thread daniel cc

Thanks Angus,
I think five minutes will be just good for me :)

What is the best way to use in order to be able to keep alive both 
server and client?


Only the client matters, ignore the server.  Just design your protocol so
the client sends regular packets, at least one every five minutes, I sent
them each minute, with the server returning an acknowledgement packet (as
I've explained twice already) that the client checks.  


If the server does not receive packets for say three times the interval,
it forcibly closes the connection.  If the client does not get a response,
it retries, then closes the connection and retries.   


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] SslWSocket processing data

2011-01-19 Thread daniel cc

Thank you :)
Sounds excellent.

Best regards


-Original Message- 
From: Francois PIETTE

Sent: Wednesday, January 19, 2011 7:33 PM
To: ICS support mailing
Subject: Re: [twsocket] SslWSocket processing data


If the SslWSocket sends command such as: “Time”,
SslWSocketServer is processing it and responding by giving the time to the 
client

(this what I have noticed in the samples).


Right.


Now,
Can the same thing be done in the other way around?
SslWSocketServer sends command such as : ”Time”,
SslWSocket answers by sending the current time to the SslWSocketServer 
after processing.


I know how to do this in some other ways but wondering if it is possible 
to do it with

the component since it is doing it in much better way.


Once the connexion is established between client and server, you have a
bidirectional channel between both. Usualy as you have noticed in the demo,
the client send commands and the server reply. But you can revert this.
There is nothing special to program as far as communication is concerned. It
is just the application logic: what does the client when it receive
something from the server ? I can simply parse it, consider it as a command
and send back some informations.


My question will be,
can this be done for the client side where the client receives command 
from the server,

processes it and responds to the server.


Exactly.


---
procedure TSimpleSslServerForm.ProcessData(Client: TTcpSrvClient);
var
   I   : Integer;
   P   : Pointer;
   AClient : TTcpSrvClient;
begin
   { We could replace all those CompareText with a table lookup }
---


ProcessData becomes handling (parsing) client response to previously sent
command.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

[twsocket] SslWSocketServer GET REMOTE COMPUTER NAME

2011-01-19 Thread daniel cc
Hi guys,
Is there any built in procedure for getting the remote computer’s name?
if not,
I will get the computer name from the client site and send it to the server as 
command when the connection is made.

thanks.
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

[twsocket] TWSocket and Client number

2011-01-18 Thread daniel cc
Hello,
What do I need to do to get the client number into the server?

As you can see here,
I get the computer’s name, IP and Port but the client number is missing.
---
procedure TSimpleSslServerForm.SslWSocketServer1ClientConnect(
Sender : TObject;
Client : TWSocketClient;
Error  : Word);
begin
with Client as TTcpSrvClient do begin
Display('['+ GetComputerName + ']'+ //here we are getting the client 
number.
'Client connected.' +
' Remote: ' + PeerAddr + '/' + PeerPort +
' Local: '  + GetXAddr + '/' + GetXPort);
Display('There is now ' +
IntToStr(TWSocketServer(Sender).ClientCount) +
' clients connected.');
LineMode:= True;
LineEdit:= True;
LineLimit   := 80; { Do not accept long lines }
OnDataAvailable := ClientDataAvailable;
OnLineLimitExceeded := ClientLineLimitExceeded;
OnBgException   := ClientBgException;
OnSslVerifyPeer := ClientVerifyPeer;
ConnectTime := Now;
end;
end;
---
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Re: [twsocket] TWSocket and Client number

2011-01-18 Thread daniel cc

Thanks Angus,
I don't know if we are at the same track,
The reason of trying to get the number of the client is: To use it for 
sending commands to the client as following,

SslWSocketServer1.Client[0].SendStr(ledSendCommand.Text + #13 + #10);

The idea is not the answer when the client asks something, it is to send 
command with out asking.

Let's say, I just want to send Reboot comand to the client.

If I have many clients connected and I have all the clients are listed in a 
TLISTBOX or in COMBOBOX and I just want to select one of them and send 
the command.


Thanks


-Original Message- 
From: Angus Robertson - Magenta Systems Ltd

Sent: Tuesday, January 18, 2011 11:48 AM
To: twsocket@elists.org
Subject: Re: [twsocket] TWSocket and Client number


What do I need to do to get the client number into the server?


You don't because the client number changes each time a new connection is
added or closed.  You have to lookup the number each time you need it.
Or design your application so it's not needed.

Look at the FTP server component and it's demo project, which does
exactly what you are laboriously attempting to replicate.  It sends data
back to clients, in response to data sent by the clients. And it sends
files.

Angus

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TWSocket and Client number

2011-01-18 Thread daniel cc

Thanks Angus,

So you build your combobox, wait 10 seconds, one client disconnects, all
the clients numbers reduce by one and your combobox is out of date. When
you try to send a command to one of them it may be the wrong client or
you'll get an exception because there are fewer clients.



I didn't think of this :(


That's why you were told to use PeerAddr and PeerPort of the client, not
a client number, and look it up immediately before sending a command.


This I have been working on but I just can't success, that is why I have 
been looking for an easier way.


Or more sensibly, look at the protocol I outlined in the my first message
a few days ago, which included the computer name in the packet fields,
then you can store that and use that instead (assuming your computers
have sensible names.  You should be testing all this between multiple PCs
or VMs, as in real life, not 127.0.0.0 on a single PC.



Yes,
I am already testing in real life and even the clients are behind of another 
network (not the same network).
I can't find the message you have sent with the computername in the packet 
fields.



--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TWSocket and Client number

2011-01-18 Thread daniel cc

My packets looked like this:

TxData: CV121RML-0002|NN130120080707-170202|20080707-170204||
RxData: CS010PC08|20080707-160204|0|RML-0002|



Thanks Angus,
I understand what you mean but this unfortunately is too much for me :(
I can't make/handle this because I don't even know how to handle these 
TxData or RxData.


That is why I have been desperately seeking for an easier solution for 
sending commands to the client.


I have been trying to use the IP (PEERADDR) and the port (PEERPORT) in this,
SslWSocketServer1.Client[0].SendStr(ledSendCommand.Text + #13 + #10);
for trying to send with no success.

The command is gonna be typed into a TLabelEdit component which is text 
and sending requires integer and I still can't find the way of handling it.


such as: SslWSocketServer1.Client[PeerAddr ].SendStr(ledSendCommand.Text + 
#13 + #10); -- have tryed this in hundreds of ways and can't unfortunately 
make it work.


Do you think it would work if,
I create another TLabelEdit which will carrie the IP address of the client 
and convert it to an integer before use,


Use as,
Type the IP of the client into this TLabelEdit, convert it to integer.
Find the PeerAddr. which is placed in this label from the display component,

and than use as:
PeerAddr. := ledEdit.Text;  //this will be converted to integer
SslWSocketServer1.Client[ledIPEdit.Text].SendStr(ledSendCommand.Text + #13 + 
#10);


So far I haven't got any other ideas.


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TWSocket and Client number

2011-01-18 Thread daniel cc


That's why you need a server socket listening at each client computer.
Every time the a client computer starts, connect to the Server computer
and introduce himself. Hey, my name is Earl and I'm listening  to your
commands at this Address. I will report to you any errors occurring here.
With this introduction message you can now add one more Client computer
to your Combobox of the Server Application.  Now you have a Client
that, even if disconnected, you know is listening at that Address for
any command the Server wish to send.



There is a reason for not doing it.
The clients will be placed in different locations and the idea is to have 
ports opened only at the Server site.
Clients are not having static IP and the place where clients are gonna be 
doesn't allow top open any ports for incoming trafic etc.


Connecting from the server to the server placed in clients isn't going to 
work in my case or perhaps I am mistaking?


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TWSocket and Client number

2011-01-18 Thread daniel cc

Hi Angus,
I am very much pleased and I thank you very much for trying to help me out.


Sorry, but you really are out of your depth here, you need to understand
simple programming first.  We can not write your programme for you.



Yes,
I do have limited knowledge for now but, I am learning all the time.
The idea is not to make any application right now it is to just make the 
demo work in order to be able to test the components.
If I can make this demo first than I will have plenty of time for studying 
the rest of it :)


Communication between my app and the server is a very tiny part of it which 
is not going to be  very complicated either.
I am working on my app now and I will at the same time test the components 
before making the implementation.


I have made mistake twice regarding the ICS, I had chance to use them twice 
somewhile ago and I have skipped (because I didn't have time to study).

I am not going to skip now because I see too much good in ICS.

However, you have to find the client number that matches the IP address
and port, by using a loop.

clientnr := -1 ;
for I := 0 to SslWSocketServer1.ClientCount do
begin
   if SslWSocketServer1.Client[I].GetPeerAddr = MyPeerAddr and
   SslWSocketServer1.Client[I].GetPeerPort = MyPeerPort then
   begin
   clientnr := I;  // found it
   break;
   end;
end;
if clientnr = 0 then SslWSocketServer1.Client[clientnr].SendStr (etc)



About this piece of code,
What is the MyPeerAddr? -- Integer?

MyPeerAddr and Port come from a table you saved earlier when each
connection was started.  The code above is not very efficient, there is
an overhead to GetPeerPort, so you should really save them as a derived
ClientClass, exactly as the FTP server does, look at the code.

If you mean a database table,
I do not have any and I couldn't make this code work in any possible ways.

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] SslWSocketServer SslWSocket

2011-01-18 Thread daniel cc

Hi Marc,
Your code works perfectly :)
It created the UniqueID for the client and I believe this just was what I 
needed. Now I will be able to select the client of my choice with this ID.

I will do the rest and start testing.

Thanks a lot for the great help :)

Best regards

-Original Message- 
From: Marc Charbonneau

Sent: Tuesday, January 18, 2011 3:58 PM
To: ICS support mailing
Subject: Re: [twsocket] SslWSocketServer  SslWSocket


Thanks Marc,
Have been playing 2 days with this and still can't find out the way how 
to

do.


Ok, here's a simple solution with TcpSrv demo :

In TTcpSrvForm declaration, in the private part, add this

   FClientNo : integer;

Now, go in procedure TTcpSrvForm.WSocketServer1ClientConnect and
change the code to look like this :
procedure TTcpSrvForm.WSocketServer1ClientConnect(
   Sender : TObject;
   Client : TWSocketClient;
   Error  : Word);
begin
   with Client as TTcpSrvClient do begin
   Inc(FClientNo); // Increment unique client no
   Tag := FClientNo; // tag connecting client with it's id
   Display('Client connected. UniqueID : ' + IntToStr(Tag) +
   ' Remote: ' + PeerAddr + '/' + PeerPort +
   ' Local: '  + GetXAddr + '/' + GetXPort);
   Display('There is now ' +
   IntToStr(TWSocketServer(Sender).ClientCount) +
   ' clients connected.');
   LineMode:= TRUE;
   LineEdit:= TRUE;
   LineLimit   := 80; { Do not accept long lines }
   OnDataAvailable := ClientDataAvailable;
   OnLineLimitExceeded := ClientLineLimitExceeded;
   OnBgException   := ClientBgException;
   ConnectTime := Now;
   end;
end;

Now, change your SendCommand procedure to something like this :

procedure TTcpSrvForm.SendCommand(ClientNo: integer; CommandText: string);
var
 i: integer;
begin
for i := 0 to WSocketServer1.ClientCount -1 do
begin
 // iterate all client trying to find the right one
  if WSocketServer1.Client[i].Tag = ClientNo then
  begin
WSocketServer1.Client[i].SendStr(CommandText);
Display('Command sent: ' + CommandText);
   break;
  end;
end;
end;

This should do what you want.

hope this help

Marc
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TWSocket and Client number

2011-01-18 Thread daniel cc

Hi Angus,

You probably only want to send
a reboot PC command once...



Yes,
commands (just few) will be sent real seldom (once or twice in a week).
Communication will be made mostly by the client ans server will respond by 
doing very small things.


It is actually faster to use FClientNo as per Marc's suggestion, since
this avoids stale sessions, the FTP server uses something similar.



Yes,
Marc's solution looks excellent, it is easy to find by searching the memo 
component directly from the code and very easy to copy to XML file for 
creating client list etc.


I would like to thank you once more for all the help and specially for being 
pation.


With best regards 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] SslWSocket processing data

2011-01-18 Thread daniel cc
Hi guys,
If the SslWSocket sends command such as: “Time”,
SslWSocketServer is processing it and responding by giving the time to the 
client (this what I have noticed in the samples).

Now,
Can the same thing be done in the other way around?
SslWSocketServer sends command such as : ”Time”,
SslWSocket answers by sending the current time to the SslWSocketServer after 
processing.

I know how to do this in some other ways but wondering if it is possible to do 
it with the component since it is doing it in much better way.

My question will be,
can this be done for the client side where the client receives command from the 
server, processes it and responds to the server.
---
procedure TSimpleSslServerForm.ProcessData(Client: TTcpSrvClient);
var
I   : Integer;
P   : Pointer;
AClient : TTcpSrvClient;
begin
{ We could replace all those CompareText with a table lookup }
---

Thanks
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread daniel cc



-Original Message- 
From: Francois PIETTE

Sent: Monday, January 17, 2011 9:33 AM
To: ICS support mailing
Subject: Re: [twsocket] SslWSocketServer  SslWSocket


and it doesn't work


Please be more specific. What error/exception do you have ?




Hi Francois,
Thanks for the response and being pation.

I have checked in the project the -- OnDataAvailable as you adviced and it 
is absolutely same as what I also have.


What I am trying to do is,
Server is on and running, client is connected and I have the info on 
Display which says about what client is connected etc.


Now,
How can I selected a specific client, let's say client 1 and send a command 
to it?


Here is what I am trying,

SslWSocketServer1.(Sender).Send(MyBufAddr, MyBufLnegth); -- need to be able 
to send the command which is typed in the TEdit field and I have no idea 
about how this works, so far I don't even know how to handle -- (MyBufAddr, 
MyBufLnegth);  either.


After sending the command to the client,
Display('Command sent: ' + ledSendCommand.Text); -- ledSendCommand is a 
TLabelEdit


-daniel 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread daniel cc

and it doesn't work

Please be more specific. What error/exception do you have ?


You have not answered this one.



Most of the errors were -- Socket not connected.


Speaking about code, you select it by its index in the Client[] property.
How you find the right index is YOUR application problem. Tell me in english
how you would like to select one client among all the connected clients and
I will help you translate this specification to code.



Here is what need to do,
When the client is connected,
It informs it's IP and connection port to the server as this: Client 
connected. Remote: 127.0.0.1/51665 Local: 127.0.0.1/443
I need to be able to use this information or ar least some of this 
information to send some commands this client.


But, are you sure you don't want to revert the client/server roles ?
It would be much simpler for you.


I am sorry but I don't understand what you mean with this, Windows 
server/client rules or component?


If the side you name server has to send commands to the side you name
client for execution and get back results, then what you name server is
actually a socket client and what you name client is actually a socket
server.

To say it otherwise: There is no problem having the computer you name
server to be an actual client - as far as socket programming is
concerned - for the computer you name as client which is turn would be a
server as far as socket programming is concerned.

You may also have both client and server socket at both side. By the way,
this is how FTP is working: the FTP client connect to the FTP server to send
commands (file transfert, dir list,...) to be executed by the server. When
the FTP server has to transfert a file, the (FTP) server become a (socket)
client connecting to a (server) socket located at the (FTP) client ! This
could be a scheme you could use to design your application.



Do you think I need both in both sides?
If yes,
Is it going to make any easier for me?
I need to start with sending commands but I need to send and receive files 
also in feature.




SslWSocketServer1.(Sender).Send(MyBufAddr, MyBufLnegth); -- need to be 
able to send the command which is typed in the TEdit field and I have no 
idea about how this works, so far I don't even know how to handle -- 
(MyBufAddr, MyBufLnegth);  either.


Excuse me, don't take it worng, but I'm wondering if you know Delphi
programming or not :-(
You can see in the component source code and in the samples that Send method
takes two arguments, the first is a pointer to what you want to send and the
second is the number of bytes to send. You have a lot of ways to use that in
your software ! If you only have text to send, probably SendStr() method
will be easier for you: it take a single string type argument. Look at the
implementation to learn how SendStr() call Send()...



Sorry again for not being able to explain clearly,
There is,
.Send
.SendSTR
.SendLine

My problem is,
What is the right way and how can I get the result I need?

Best regards 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread daniel cc

Guys,

Looks like nothing is possible to do in the simple and basic ways with ICS??

I was just thinking that I have understood a bit of the components today and 
now you guys are making it lot more complicated for me.


All I need is,
A server who accepts the clients and tells me which clients are online, can 
send once a while a simple command such as: reboot or send a file such as: 
setup.exe
A client who accepts  the command: reboot from the server and does the 
asked, receives the file setup.exe and does the asked.

The server will have maximum of 200 clients nothing more.

Sounds simple?
I can do this in 2 hours with TCUSTOMSOCKET of Delphi and protect it with 
SSH tunnel.

Why don't I?
Simple: because I want to do it with SSL in order to be able to have the 
better security, to have it in whole one piece and that is also the reason 
why I am not interested of doing it with the regular components because I 
can't secure them, because I don't have the knowledge of securing them.


Now,
Could you please answer,
can this be done with ICS or not?
if yes,
can you help me with the following procedure?
-
{This procedure sends the command to the clients and it works very nicely.}
procedure TSimpleSslServerForm.SendCommand;
begin
 SslWSocketServer1.Client[0].SendStr(ledSendCommand.Text); /// The PROBLEM 
here is: How do I send the command to a specific client if I have more than 
one client?

 Display('Command sent: ' + ledSendCommand.Text);
end;
--

Thanks in advance

-daniel


-Original Message- 
From: Francois PIETTE

Sent: Monday, January 17, 2011 3:55 PM
To: ICS support mailing
Subject: Re: [twsocket] SslWSocketServer  SslWSocket


But, are you sure you don't want to revert the client/server roles ?
It would be much simpler for you.


I am sorry but I don't understand what you mean with this, Windows 
server/client rules or component?

Do you think I need both in both sides?


Here is how I see your problem solved:
First let agree on terminology. I need 4 names: master, remote, client and
server.
I will name remote computer or simply remote the group of computers you
currently name client. I will name master computer or simply master
the computer you actually name server.
I will name server socket or simply server a socket which passively wait
(listen) for incomming connections.
I will name client socket or simply client a socket which will do
whatever is needed to establish a connection.

Here are a few consequences:
Client socket will connect to server socket.
A socket server may have a lot of client connected.
Remote computer can have either or both client and server socket.
Master computer can have either or both client and server socket.

Here is how the whole application, distributed between remote (several) and
master (only one) comoputer would operate.
The master computer shall have a single server socket waiting (listening)
for remote computer connections.
A remote computer (there are a lot of them) shall connect to the master
computer using a client socket.
A remote computer shall send commands to the master. Basically there are two
commands: subscribe and unsubscribe.
Master computer receiving the subscribe command will add the remote computer
in a list of remote computers participating in the work. Wehn receiving the
unsubscribe command, the master computer will remove a remote computer from
the list.
The master computer, having the list of all participating remote computers
will be able to send commands to each remote computer. To do so, the master
computer shall use a client socket to connect to the server socket listening
at remote computer side. Obviously, each remote computer has a server socket
waiting for connections and commands from the master they subscribed. That
socket is programmed to accept only connections from the master after
subscriuption take place.
Remote computer receiving commands from master computer will execute the
command and return result back to the master computer.

This is a general picture of your software as I see it. Many details remains
to be fixed but you get the general ideas.
Other solutions are obviously possible, including using server socket only
at master side.

I can develop a specific set of demo programs for you, but not for free.
Contact me by email if you want an offer.

Regards,
--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be


- Original Message - 
From: daniel cc dan...@signedsource.com

To: ICS support mailing twsocket@elists.org
Sent: Monday, January 17, 2011 11:03 AM
Subject: Re: [twsocket] SslWSocketServer  SslWSocket



and it doesn't work

Please be more specific. What error/exception do you have

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread daniel cc

Angus,
Thanks for the response,

I am very pleased with all the help I have got here and I do love ICS 
components.

I wouldn't be trying do do anything with them would I?
If I wouldn't be happy with the components and with the help.

What I need here is some easy basic things not complecated ones.
I have been studying the components for about a week now and I already can 
do many things with them.


So,
My questions still remains,
can I do what I need with ICS?

Yes I can do with Delphi's TCUSTOMSOCKET because I already have an 
appliccation which does many things in my LAN environment (it is server and 
client based as well).

But,
I don't think it is as good as ICS and that is the reason why I would like 
to be able to understand and do things with ICS.


All I am trying to do with ICS right now is a simple demo for testing and to 
see how things are going to work and I believe that shouldn't take more than 
a week to achive.


I have been checking all the demos and trying to understand about how to 
send a Command to a specific client and I simply can't find it!
There are too many projects where the things are handled differently in each 
of them and none sends commands to the server.


I have made this test procedure which works but only if there is just one 
client.

-
{This procedure sends the command to the clients and it works very nicely.}
procedure TSimpleSslServerForm.SendCommand;
begin
 SslWSocketServer1.Client[0].SendStr(ledSendCommand.Text); /// The PROBLEM
here is: How do I send the command to a specific client if I have more than
one client?
 Display('Command sent: ' + ledSendCommand.Text);
end;
-




A server who accepts the clients and tells me which clients are
online, can send once a while a simple command such as: reboot or
send a file such as: setup.exe
A client who accepts  the command: reboot from the server and
does the asked, receives the file setup.exe and does the asked.
The server will have maximum of 200 clients nothing more.

Sounds simple?
I can do this in 2 hours with TCUSTOMSOCKET of Delphi and protect
it with SSH tunnel.
Could you please answer,
can this be done with ICS or not?


If you think you can write and test the project in two hours with that
Delphi component, just go and do it.

A lot of people here are spending a lot of time trying to help you, for
free, whether you wish to listen to our advice or not is your choice.

All the code you need is in the samples, and protocols like FTP client
and server, you just need to spend some time looking at the code and
understanding it.

I did it, numerous other people have done it, you can do it, but not in
two hours.

Angus


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread daniel cc

Said in other word: How do I find the index to use with Client[] property ?
We cannot answer that question for you because we don't know the criteria !
You can create a form to ask the user which IP the client has and then
iterate thru Client[] array and look for the correct IP.



Yes,
This is what I need and Iam trying to send command to the client by using 
it's IP
As I can see here (OnProcessData) that I am getting the IP -- 
Client.SendStr(AClient.PeerAddr + ':' + AClient.GetPeerPort + ' ' +

but,
I don't know how to do this, and that is what I have been looking in the 
demos to find today.






Yes,
I do understand :)

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread daniel cc

-

SslWSocketServer1.Client is an array of your clients.
So if you have 2 clients, the first one is Client[0] and the second
one is Client[1].
If you have a third client then he's at Client[2].

I think you get the picture



Yes,
I get the picture.

so change your procedure to something like this :
procedure TSimpleSslServerForm.SendCommand(ClientNo: integer);
begin
SslWSocketServer1.Client[ClientNo].SendStr(ledSendCommand.Text);
Display('Command sent: ' + ledSendCommand.Text);
end;



How do you set this -- (ClientNo)?
How do you get the number in here?

Can you please explain a bit? 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread daniel cc


What is so difficult? Property Client is an array of currently
connected client objects, property ClientCount returns the number
of objects in that array. You work with it like with a standard
Delphi TList as well. For example, in order to iterate over all
client objects:


The difficulty is that I am quite lost with this and can't find a way of 
sending command to the client of my choice.


var
 Cli: TWSocketClient;
begin
 for i := 0 to WSocketServer1.ClientCount -1 do
 begin
   Cli := WSocketServer1.Client[i];
   if Cli meets some condition here then
 Call some Cli.method;
 end;
end;



Where do I call this exactly?

During the send? or receive?
Or a spearate procedure? how?

The problem here is,
You guys are treating me like an expert and I just don't understand half of 
the things what you are saying.



--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread daniel cc


Well, without knowing more on your setup, one way I can see to
differentiate your clients is with their IP. The client IP is
available in Client[x].PeerAddr.



My setup?
I am working on a demo,
I have memo field where I need to see the number of the client.

If I can get the number of the client than I will be able to do the rest.

Could you please help me out to get the client number into that memo?

I hope this help.
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread daniel cc

Something like this ? (Out of my head, not tested)

for ClientNo := 0 to WSocketServer1.ClientCount - 1 do begin
   if Client[ClientNo].PeerAddr = '192.168.1.123' then begin
   Client[ClientNo].SendStr('HelloWorld'#13#10);
   break;
   end;
end;



Hi Francois,
Could you please check the following code of both server and client 
procedures and tell me what is missing in order to be able to get the client 
number into the DISPLAY with the all other info.This is code writen by you 
i think. I have add few things and there might be mistakes.



I am certain, I will be okay after that.

Thanks a lot in advance.

Here is procedures OnDataAvailable and ProcessData of the SERVER
-
{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*}
procedure TSimpleSslServerForm.ClientDataAvailable(
   Sender : TObject;
   Error  : Word);
begin
   with Sender as TTcpSrvClient do begin
   { We use line mode. We will receive complete lines }
   RcvdLine := ReceiveStr;
   { Remove trailing CR/LF }
   while (Length(RcvdLine)  0) and
 IsCharInSysCharSet(RcvdLine[Length(RcvdLine)], [#13, #10]) do
   RcvdLine := Copy(RcvdLine, 1, Length(RcvdLine) - 1);
   Display('Received from ' + GetPeerAddr + ': ''' + RcvdLine + );
   ProcessData(Sender as TTcpSrvClient);
   end;
end;

{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*}
procedure TSimpleSslServerForm.ProcessData(Client: TTcpSrvClient);
var
   I   : Integer;
   P   : Pointer;
   AClient : TTcpSrvClient;
begin
   { We could replace all those CompareText with a table lookup }
   if CompareText(Client.RcvdLine, 'help') = 0 then
   Client.SendStr('Commands are:' + #13#10 +
  '  exit' + #13#10 +
  '  who' + #13#10 +
  '  time' + #13#10 +
  '  exception' + #13#10 +
  '  binary [size]' + #13#10)
   else if CompareText(Copy(Client.RcvdLine, 1, 6), 'binary') = 0 then
   begin
   I := StrToIntDef(Copy(Client.RcvdLine, 7, MaxInt), 0);
   if I = 0 then
   Client.SendStr('500 Error binary size not spezified'#13#10)
   else begin
   if I  MaxWord then
   begin
   Client.SendStr('500 Error binary size limited to ' +
  IntToStr(MaxWord) + ' bytes'#13#10);
   Exit;
   end
   else
   Client.SendStr('200 OK Binary ' + IntToStr(I) +
  ' bytes requested'#13#10);
   Inc(I, SizeOf(THdrRec));
   GetMem(P, I);
   try
   FillChar(P^, I, '1');
   PHdrRec(P)^.ID  := 0; // any value  32 marks = valid
binary data.
   PHdrRec(P)^.Size:= I - SizeOf(THdrRec);
   PAnsiChar(P)[I - 1] := 'E';
   Client.Send(P, I);
   finally
   FreeMem(P);
   end;
   end;
   end
   else if CompareText(Client.RcvdLine, 'exit') = 0 then
   { We can't call Client.Close here because we will immediately }
   { reenter DataAvailable event handler with same line because  }
   { a line is removed from buffer AFTER it has been processed.  }
   { Using CloseDelayed will delay Close until we are out of }
   { current event handler.  }
   Client.CloseDelayed
   else if CompareText(Client.RcvdLine, 'time') = 0 then
   { Send server date and time to client }
   Client.SendStr(DateTimeToStr(Now) + #13#10)
   else if CompareText(Client.RcvdLine, 'who') = 0 then begin
   { Send client list to client }
   Client.SendStr('There are ' +
IntToStr(SslWSocketServer1.ClientCount) +
  ' connected users:' + #13#10);
   for I := SslWSocketServer1.ClientCount - 1 downto 0 do begin
   AClient := TTcpSrvClient(SslWSocketServer1.Client[I]);
   Client.SendStr(AClient.PeerAddr + ':' + AClient.GetPeerPort + '
' +
  DateTimeToStr(AClient.ConnectTime) + #13#10);
   end;
   end
   else if CompareText(Client.RcvdLine, 'exception') = 0 then
   { This will trigger a background exception for client }
   PostMessage(Client.Handle, Client.FMsg_WM_TRIGGER_EXCEPTION, 0, 0)
   else
   if Client.State = wsConnected then
   Client.SendStr('Unknown command: ''' + Client.RcvdLine +  +
#13#10);
end;
-
And here is OnDataAvailable for the client.
-
procedure TfrmMain.SockDataAvailable(Sender: TObject; ErrCode: Word);
var
   Buf : array [0..255] of AnsiChar;
   Len : Integer;
begin
   Len := 

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread daniel cc

Have a look at the event OnClientConnect, this is called whenever a
client connect, just grab the client info there and you should be good
to go.

Thank you :)
Now we are getting close.

Here is what I have,
and please see the line for the client number,
Now I at least now where should I define it, just need to find out how?
---
procedure TSimpleSslServerForm.SslWSocketServer1ClientConnect(
   Sender : TObject;
   Client : TWSocketClient;
   Error  : Word);
begin
   with Client as TTcpSrvClient do begin
   Display('Client connected.' +
   '[]' + ///Here I need to get the client number into the 
brackets

   ' Remote: ' + PeerAddr + '/' + PeerPort +
   ' Local: '  + GetXAddr + '/' + GetXPort);
   Display('There is now ' +
   IntToStr(TWSocketServer(Sender).ClientCount) +
   ' clients connected.');
   LineMode:= True;
   LineEdit:= True;
   LineLimit   := 80; { Do not accept long lines }
   OnDataAvailable := ClientDataAvailable;
   OnLineLimitExceeded := ClientLineLimitExceeded;
   OnBgException   := ClientBgException;
   OnSslVerifyPeer := ClientVerifyPeer;
   ConnectTime := Now;
   end;
end;
.

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread daniel cc

Marc,
Why we are jumping to the another planet now?
We are soo close!!

Can you please see the code!
This is just getting complicated all the time.

Isn't this component having anything such as: CLIENTID?, CLIENTNO?, ID? 
which could be posted here in the same way as the IP address and the Port?


Come on guys,
This can't be this complicated!
too many opinions but none simple??


Here is what I have,
---
procedure TSimpleSslServerForm.SslWSocketServer1ClientConnect(
  Sender : TObject;
  Client : TWSocketClient;
  Error  : Word);
begin
  with Client as TTcpSrvClient do begin
  Display('Client connected.' +
  '[' + THEID or the CLIENTNUMBER or ANYTHING which helps to 
identify + ']' + ///Here I need to get this info into the

brackets
  ' Remote: ' + PeerAddr + '/' + PeerPort +
  ' Local: '  + GetXAddr + '/' + GetXPort);
  Display('There is now ' +
  IntToStr(TWSocketServer(Sender).ClientCount) +
  ' clients connected.');
  LineMode:= True;
  LineEdit:= True;
  LineLimit   := 80; { Do not accept long lines }
  OnDataAvailable := ClientDataAvailable;
  OnLineLimitExceeded := ClientLineLimitExceeded;
  OnBgException   := ClientBgException;
  OnSslVerifyPeer := ClientVerifyPeer;
  ConnectTime := Now;
  end;
end;


Actually, TWSocketServer(Sender).ClientCount-1 will be your client
number, until one of the client disconnect.

Since it's a dynamic array, when a client disconnect, the client
number will change.

That`s why you need another way to identify your clients.


From memory, when my client connected, they would send the server

their unique ID and I would store that into a property of the client
socket. You have to derive your client socket and add properties to
it.

Something like :

 TTcpSrvClient = class(TWSocketClient)
 public
   ConnectTime : TDateTime;
   UniqueID : string;
 end;

then you assign that client socket in the server initialization (in
the TcpSrv demo,in WMAppStartup) :

   WSocketServer1.ClientClass := TTcpSrvClient; { Use our component }

Then when I wanted to send a command to a particular client, I would
just iterate all connected client searching for the right ID.

hth
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] SslWSocketServer SslWSocket

2011-01-17 Thread daniel cc

If you REALLY can't figure it out, let me know and I'll play with it
to try to find a solution for you.




Thanks Marc,
Have been playing 2 days with this and still can't find out the way how  to 
do.


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] SslWSocketServer SslWSocket

2011-01-16 Thread daniel cc
Hi all,
I have spent 4 days trying to send and receive data from “SslWSocketServer” to 
“SslWSocket”, with no success.

What am I trying to do?
I am trying to send and receive data from “SslWSocketServer” to “SslWSocket” 
(to a connected client/clients),
send and receive data from “SslWSocket” to “SslWSocketServer”.

The data is simple, which is the text of a “TEdit” component for now and later 
I would like to be able to do the same thing for files.

I have tryed everything available in the component demo library with no success 
because looks like every demo sample does the things in some ways but none does 
in the way (this is I believe is the simplest way) I need.
It is almost impossible for me to understand and digg up something from  the 
demo samples because I am a beginner.

Please notice!
I need to do this with “SSL” components not with the regular components because 
I have no need of doing this with regular components.

I would be very pleased if someone could,
- Help me with a sample of this
- Guide me to a right demo/sample where I could perhaps digg up

Thanks in advance

-daniel


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-16 Thread daniel cc

Hi Francois,
Thanks for the response.
I wish to continue with SSL if there is no difference.

This is the last message I have received from you regarding,

Please start by fully understanding OverbyteIcsSrvTcp and OverbyteIcsClient7
samples. Forget about SSL right now, you'll come back to it once you master
the basics.

Ask all questions you need to fully understand OverbyteIcsSrvTcp and
OverbyteIcsClient7 samples. The OnDataAvailable handler is procedure
TTcpDaemon.ClientDataAvailable and in procedure
TCli7Form.WSocket1DataAvailable.
-
Now,
The project OverbyteIcsSrvTcp has absolutely nothing in inside to help me. 
I can't find anything about sending or receiving in this project.


The project OverbyteIcsClient7  gives me nothing else but errors 
saying -- Socket not connected!



This is all what I can see in this project, which I already have tryed to 
use with no success.

--
procedure TCli7Form.WSocket1DataAvailable(
Sender  : TObject;
ErrCode : Word);
var
   Buf : array [0..255] of AnsiChar;
   Len : Integer;
begin
   Len := TCustomLineWSocket(Sender).Receive(@Buf, Sizeof(Buf) - 1);
   if Len = 0 then
   Exit;
   Buf[Len] := #0;
   if not WSocket1.LineMode then
   { Normal mode, data is just a buffer with all caracters }
   Display('DataAvailable (' + IntToStr(Len) +' bytes): ''' +
   String(StrPas(Buf)) + )
   else begin
   { Line mode, buffer contains exactly one line, terminated by the }
   { LineEnd string, unless our buffer is too small in which case   }
   { the line is truncated. We'll get the end of line on the next   }
   { call to Receive.   }
   Display('Line: ''' + RemoveEndOfLine(String(StrPas(Buf))) + );
   end;
end;






-Original Message- 
From: Francois PIETTE

Sent: Sunday, January 16, 2011 7:08 PM
To: ICS support mailing
Subject: Re: [twsocket] SslWSocketServer  SslWSocket

Hello daniel,

As I said before, please FIRST do the job WITHOUT SSL. You'll add SSL later.
It is the same component with or without SSL. Simply the SSL code is
compiled with the conditinal symbol use_ssl so that application which do
not require SSL stay independent of OpenSSL and stay smaller.

In my last message, I pointed you to two samples. Please start from there.

Regards,
--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be


- Original Message - 
From: daniel cc dan...@signedsource.com

To: TWSocket twsocket@elists.org
Sent: Sunday, January 16, 2011 5:13 PM
Subject: [twsocket] SslWSocketServer  SslWSocket



Hi all,
I have spent 4 days trying to send and receive data from 
 “SslWSocketServer” to “SslWSocket”, with no success.


What am I trying to do?
I am trying to send and receive data from “SslWSocketServer” to 
“SslWSocket” (to a connected client/clients),

send and receive data from “SslWSocket” to “SslWSocketServer”.

The data is simple, which is the text of a “TEdit” component for now and 
later I would like to be able to do the same thing for files.


I have tryed everything available in the component demo library with no 
success because looks like every demo sample does the things in some ways 
but none does in the way (this is I believe is the simplest way) I need.
It is almost impossible for me to understand and digg up something from 
the demo samples because I am a beginner.


Please notice!
I need to do this with “SSL” components not with the regular components 
because I have no need of doing this with regular components.


I would be very pleased if someone could,
- Help me with a sample of this
- Guide me to a right demo/sample where I could perhaps digg up

Thanks in advance

-daniel


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Re: [twsocket] SslWSocketServer SslWSocket

2011-01-16 Thread daniel cc

The OverbyteIcsSrvTcp uses the OverbyteIcsTcpCmd.pas, where you will
find the code of the server.



Yes,
I already knew this.



Make sure you have the server running, before you hit the client connect
button.
Make also sure the client port is set to the same server port. The
server port is set to 2120,
So, make sure you set the client to port 2120 too.




Yes,
I knew this too.
And I still can't make it work,
It gives error when clicking the connect button and it gives error when 
clicking the send button.


however,
I will be able to fix the errors but,
this still doesn't help me much because,
I need to be able to send the commands from the server to the client as 
well.
I can find nothing about how to send anything from server to the selected 
client.


Thanks.

-daniel


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] SslWSocketServer SslWSocket

2011-01-16 Thread daniel cc

Huch? There's method WSocket1DataAvailable that receives data
and SendButtonClick that sends strings.


There is no such button SendButtonClick in this project -- 
OverbyteIcsSrvTcp.bdsproj.

Are we talking about the same project or is it something which I don't have?


TCP/IP requires a connection before data can be sent or received.
A client has to connect to the server first.



Absolutely.




This method triggers whenever data sent by the server is received.

But wait, I just found and fixed a bug in OverbyteIcsCli7 that was 
introduced

during the Unicode conversion. Exchange function RemoveEndOfLine by :

function RemoveEndOfLine(const Line : String) : String;
begin
   if (Length(Line) = Length(EndOfLine)) and
  (StrLComp(PChar(@Line[1 + Length(Line) - Length(EndOfLine)]),
PChar(EndOfLine),
Length(EndOfLine)) = 0) then
   Result := Copy(Line, 1, Length(Line) - Length(EndOfLine))
   else
   Result := Line;
end;




This has fixed the error :)
I can now send from client to the server.

But,
I still can't send anything from server to the client. 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] SslWSocketServer SslWSocket

2011-01-16 Thread daniel cc


Assuming N is the index of the selected client, you send something using 
this line of code:

   WSocketServer.Client[N].Send(MyBufAddr, MyBufLnegth);

When sending something back to a client having sent a command, you use the 
sender argument of the dataavailable event. This sender represent the 
client:

  TWSocket(Sender).Send(MyBufAddr, MyBufLnegth);



I still can't find anything regarding this in existed demos/samples.

Thanks

-daniel

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] SslWSocketServer SslWSocket

2011-01-16 Thread daniel cc

Assuming N is the index of the selected client, you send something using
this line of code:
   WSocketServer.Client[N].Send(MyBufAddr, MyBufLnegth);

When sending something back to a client having sent a command, you use the
sender argument of the dataavailable event. This sender represent the
client:
  TWSocket(Sender).Send(MyBufAddr, MyBufLnegth);

And also,
Do I need anthing else for the TWSocket like OnSendData, OnConnect, 
OnDisconnect?
I am sorry to say but this -- WSocketServer.Client[N].Send(MyBufAddr, 
MyBufLnegth);


I have already tryed this in dozens of ways and it doesn't work -- 
TWSocket(Sender).Send(MyBufAddr, MyBufLnegth); or I simply can't make it 
work.





--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] SslWSocketServer Send and receive

2011-01-15 Thread daniel cc

To receive data, each side install an OnDataAvailable event handler and from
there call Receive to get hand on data.

All this is perfectly shown in many of the samples.




Could you please inform the name of these samples?

Thanks in advance

-daniel


--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be


- Original Message - 
From: daniel cc dan...@signedsource.com

To: ICS support mailing twsocket@elists.org
Sent: Saturday, January 15, 2011 12:23 AM
Subject: Re: [twsocket] SslWSocketServer Send and receive



Thanks Francois,
Sorry for not making myself clear :(
I already know these.

How do I send text comand from server to the client  after it has 
established a connection to the server?

how do I do the same thing from client to the server?
for example: Server sends Hello client to the client and client answers 
Hello server to the server.

a little example perhaps?

And how do I do the same thing with the upload and download?
like server sends some file/files to the client and client sends some 
file/files to the server.

a little example?

Thanks in advance

-daniel

-Original Message- 
From: Francois PIETTE

Sent: Friday, January 14, 2011 11:23 PM
To: ICS support mailing
Subject: Re: [twsocket] SslWSocketServer Send and receive


1) I need to send from SslWSocketServer to SslWSocket,


A socket server cannot send any data to a client. The client has first to
establish the communication with the server. At server side, a new socket 
is

instanciated by SslWSocketServer to handle the communication with that
client. Then once the connection is open, it is working in both 
directions.

A server has to wait until the client connect. That's exactly what make a
server a server: passively waiting for client connection.


- Files (upload and download)
- Commands. Commands are just text lines like: change IP Address, change 
display resolution, reboot the machine ETC.


As far as the socket is concerned, files or commands is exactly the same
thing. A socket with an established connection is a bidirectional
transparent data stream. What you send at one end is received at the other
end. To send a file, you read the file block by block and you send each
block. You'd probably add some metadata in front of the file data so that
the receiver know at least the file size and maybe filename, timestamp and
so on. Basically that is what HTTP protocol is doing. You can reuse HTTP 
or

design your own protocol.

Commands being simple text lines, the socket has a line mode which will
facilitate your programming. When line mode is active, the socket will
assemble incomming data into lines and trigger OnDataAvailable for each
complete line no matter how it is spread into packets of various sizes.


2) I need to send from SslWSocket to SslWSocketServer,
- Files (upload and download)
- Commands. Commmands are just text lines like: CPU temp is: 60%, HDD 
space left: 10% ETC.


See above.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] SslWSocketServer Send and receive

2011-01-15 Thread daniel cc


Clearly you did not read my earlier message, or you would not be asking
many of these questions, but would have your project working already.

Angus




Thanks Angus,
I did read your early message.
I unfortunately can't get anything out of it because I am not that good to 
understand and do right away what you are telling.
I still need some names of the examples where the info is not the entire 
library which I have no idea about what to search.


I will be very pleased if you guys could stop treating me as a guru which I 
am not.
I am just a beginner  and the things you explain me to do aren't that simple 
for me to do  if there aren't any samples.


Thanks

-daniel 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] SslWSocketServer Send and receive

2011-01-15 Thread daniel cc

Thanks Angus,
Now I understand you perfectly :)
Thank you very much for the help and for being pation.
I will continue from here and see how forward I can go.

Best regards

-Original Message- 
From: Angus Robertson - Magenta Systems Ltd 
Sent: Saturday, January 15, 2011 4:41 PM 
To: twsocket@elists.org 
Subject: Re: [twsocket] SslWSocketServer Send and receive 

I unfortunately can't get anything out of it because I am not that 
good to understand and do right away what you are telling.


You should first run two or more instances of the EXE demo in Magenta
Systems IP Log Streaming Component I referred before, one as client, one
as server, they will show sending packets to each other without even
opening Delphi.  


Then look at the source code for the EXE demo and you will see one method
to send a packet (a line of text), one event to receive a packet (that
line).  You copy code from that demo and the core of your application is
running in 30 minutes without needing to understand any more about
TWSocket, or be concerned about onDataAvailable or such low level events.


Note the logger component does not use SSL, but SSL is something you can
add to your project much later, when you have a hundred more important
things working properly.  And once you have read the SSL book and fully
understand certificates, which is not trivial or for beginners. 

I am just a beginner  and the things you explain me to do aren't 
that simple for me to do  if there aren't any samples.


We have pointed out several examples already. 


You also need to think about the hardware requirements to develop and
test your project, you will needs multiple PCs or at least multiple VMs
on one PC to test anything properly.  The server PCs will need domain
names, with SSL certificates generated for them.  I had eight PCs when I
was developing an identical project.  Don't expect to test this on end
user PCs. 


Angus

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TWSocket and SSL

2011-01-14 Thread daniel cc

Hi Francois,
Thanks for the response :)
I don't have the book yet but I have already collected some info.

Here are few unclear things,
1) Do I need to install the OpenSSL to the machine?
2) How do I use the batch file for making the keys, the batch file is made 
by you and it is founded in SSL directory of the component, this batch file 
looks real good but how it works?
3) How  do I set the keys for each client and where do I keep the keys in 
the server?
4) How about the root certificate, where do I keep it, in my server 
directory?


You see,
I need to first understand the basic things about the component and will go 
for the secrets of SSL after that :)


Thanks in advance

With best regards

-daniel

-Original Message- 
From: Francois PIETTE

Sent: Friday, January 14, 2011 11:12 AM
To: ICS support mailing
Subject: Re: [twsocket] TWSocket and SSL

Hello Daniel,

I think you first need a little background knowledge about SSL and then you
can apply it with ICS components.

You should probably read the book (or at least parts of it): Network
security win OpenSSL by John Viega, matt Messier  Pravir Chandra.
O-Reilly. ISBN 0-596-00270-X. You can find it on Amazon and in any good book
store.
This book is very interesting for you because ICS-SSL is based on OpenSSL.
ICS-SSL components hide the complexity of OpenSSL programming, nevertheless,
the fundamental information is the same. Just skip any code section.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be


- Original Message - 
From: daniel cc dan...@signedsource.com

To: ICS support mailing twsocket@elists.org
Sent: Thursday, January 13, 2011 9:41 PM
Subject: Re: [twsocket] TWSocket


Yeah,
Many thanks Arno :)
Rebuilding did help.

How about the SSL keys and the certificate?
How do I use the keys in both locations (server and client), where do I copy
the keys, how do I build keys?

Thanks in advance

-daniel

-Original Message- 
From: Arno Garrels

Sent: Thursday, January 13, 2011 10:12 PM
To: ICS support mailing
Subject: Re: [twsocket] TWSocket

daniel cc wrote:

Hi,
I have got everythíng needed but still can't run the demos,
do I need to register the dll files?


No, rebuild the project, just a compile is not enough.
Whenever a conditial define changed you have to (re)build
the project, sometimes even that does not work, in such cases
(re)build the package first.

--
Arno Garrels
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] SslWSocketServer Send and receive

2011-01-14 Thread daniel cc
Hi guys,
1) I need to send from SslWSocketServer to SslWSocket,
- Files (upload and download)
- Commands. Commands are just text lines like: change IP Address, change 
display resolution, reboot the machine ETC.

2) I need to send from SslWSocket to SslWSocketServer,
- Files (upload and download)
- Commands. Commmands are just text lines like: CPU temp is: 60%, HDD space 
left: 10% ETC.

Please notice!!
I am not asking you to tell about how to change the ip address or how to get 
CPU temp.
I just need to know about how to send the message and how to receive the 
message.
How to upload the file and how to download the file.

Thanks in advance

Best regards

-daniel
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] SslWSocketServer Send and receive

2011-01-14 Thread daniel cc

Thanks Francois,
Sorry for not making myself clear :(
I already know these.

How do I send text comand from server to the client  after it has 
established a connection to the server?

how do I do the same thing from client to the server?
for example: Server sends Hello client to the client and client answers 
Hello server to the server.

a little example perhaps?

And how do I do the same thing with the upload and download?
like server sends some file/files to the client and client sends some 
file/files to the server.

a little example?

Thanks in advance

-daniel

-Original Message- 
From: Francois PIETTE

Sent: Friday, January 14, 2011 11:23 PM
To: ICS support mailing
Subject: Re: [twsocket] SslWSocketServer Send and receive


1) I need to send from SslWSocketServer to SslWSocket,


A socket server cannot send any data to a client. The client has first to
establish the communication with the server. At server side, a new socket is
instanciated by SslWSocketServer to handle the communication with that
client. Then once the connection is open, it is working in both directions.
A server has to wait until the client connect. That's exactly what make a
server a server: passively waiting for client connection.


- Files (upload and download)
- Commands. Commands are just text lines like: change IP Address, change 
display resolution, reboot the machine ETC.


As far as the socket is concerned, files or commands is exactly the same
thing. A socket with an established connection is a bidirectional
transparent data stream. What you send at one end is received at the other
end. To send a file, you read the file block by block and you send each
block. You'd probably add some metadata in front of the file data so that
the receiver know at least the file size and maybe filename, timestamp and
so on. Basically that is what HTTP protocol is doing. You can reuse HTTP or
design your own protocol.

Commands being simple text lines, the socket has a line mode which will
facilitate your programming. When line mode is active, the socket will
assemble incomming data into lines and trigger OnDataAvailable for each
complete line no matter how it is spread into packets of various sizes.


2) I need to send from SslWSocket to SslWSocketServer,
- Files (upload and download)
- Commands. Commmands are just text lines like: CPU temp is: 60%, HDD 
space left: 10% ETC.


See above.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TWSocket

2011-01-13 Thread daniel cc

Hi Francois,
Thanks for the response.
I am trying to build a server and client application as following,

Server is placed in our office and clients are all around the country in 
different locations.
Connection from the client to the server will be made by using SSH tunnel 
(port 22) which will make it safe.


I need my client to be able to send the status of itself to the server like 
every 10 minutes which will tell to the server if the client is on and okay.



From my server,
I need to be able to send messages to the client such as: reboot machine, 
change ip addresses, change screen resolution etc.


The whole system will be just for monitoring the clients and I don't need 
database at all, that is why I was wondering about the database.



Both of the demos are my by you and the versions are,
Server demo:
Creation: 8 december 1997
Version:  1.02
I would be very happy if you could provide me with new demo of this if you 
think this is too old.


Client demo:
Creation: 8 december 1997
Version:  1.07

I actually couldn't find anything newer in my component package which is the 
latest just a month old (v7).


With best regards


-Original Message- 
From: Francois PIETTE

Sent: Thursday, January 13, 2011 9:28 AM
To: ICS support mailing
Subject: Re: [twsocket] TWSocket

Hello Daniel,


I am trying toa build server nd client application,
Do we have any demos in our component package?
if yes, Under what name?



I have found the demos but,
There is Datatables in the server demo and was wondering,
What is that for and what it does?


Please be more specific about the demo you are looking at. There are a lot
of demos !
Which kind of client/server application do you want to build ?
If it is more related to databse, maybe you'd better look at my second
componetn suite named MidWare.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TWSocket

2011-01-13 Thread daniel cc

Hi Francois,
I am trying to test this server demo,
OverbyteIcsSrvDemo but I simply can't move it anywhere because it keeps 
askin about missing clients.dbf
I found the this this file in the directory and copied to the same directory 
where I keep the exe but it still keeps asking about the same file.


I would very much like to know,
What this DBF is doing in the demo project and do we have any plain demos?
I mean by plain: A demo which only shows how to use the components with out 
anything extra.


Best regards

-Original Message- 
From: Francois PIETTE

Sent: Thursday, January 13, 2011 12:46 PM
To: ICS support mailing
Subject: Re: [twsocket] TWSocket

Server is placed in our office and clients are all around the country in 
different locations. 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TWSocket

2011-01-13 Thread daniel cc

Hi Francois,
I understand :)
I have copied everything belong to the database but it still keeps 
complaining about not finding clients.dbf

I have the both,
clients.dbf and clients.mdx

Is there anything else missing?

Thanks

-daniel

-Original Message- 
From: Francois PIETTE

Sent: Thursday, January 13, 2011 4:03 PM
To: ICS support mailing
Subject: Re: [twsocket] TWSocket

OverbyteIcsSrvDemo but I simply can't move it anywhere because it keeps 
askin about missing clients.dbf
I found the this this file in the directory and copied to the same 
directory where I keep the exe but it still keeps asking about the same 
file.


You have also to copy client.mdx which is the index.


What this DBF is doing in the demo project and do we have any plain demos?


A demo always has something more or less useful to do. Many people ask for
accessing data at server side.

I mean by plain: A demo which only shows how to use the components with 
out anything extra.


Then have a look at other demos... for example those I pointed to you in my
previous message.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be



- Original Message - 
From: daniel cc dan...@signedsource.com

To: ICS support mailing twsocket@elists.org
Sent: Thursday, January 13, 2011 2:42 PM
Subject: Re: [twsocket] TWSocket



Hi Francois,
I am trying to test this server demo,
OverbyteIcsSrvDemo but I simply can't move it anywhere because it keeps 
askin about missing clients.dbf
I found the this this file in the directory and copied to the same 
directory where I keep the exe but it still keeps asking about the same 
file.


I would very much like to know,
What this DBF is doing in the demo project and do we have any plain demos?
I mean by plain: A demo which only shows how to use the components with 
out anything extra.


Best regards

-Original Message- 
From: Francois PIETTE

Sent: Thursday, January 13, 2011 12:46 PM
To: ICS support mailing
Subject: Re: [twsocket] TWSocket

Server is placed in our office and clients are all around the country in 
different locations.


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TWSocket

2011-01-13 Thread daniel cc

Sorry :(
I am gonna have to answer this myself´,
I have managed to fix this problem.

-daniel

-Original Message- 
From: daniel cc

Sent: Thursday, January 13, 2011 5:02 PM
To: ICS support mailing
Subject: Re: [twsocket] TWSocket

Hi Francois,
I understand :)
I have copied everything belong to the database but it still keeps
complaining about not finding clients.dbf
I have the both,
clients.dbf and clients.mdx

Is there anything else missing?

Thanks

-daniel

-Original Message- 
From: Francois PIETTE

Sent: Thursday, January 13, 2011 4:03 PM
To: ICS support mailing
Subject: Re: [twsocket] TWSocket

OverbyteIcsSrvDemo but I simply can't move it anywhere because it keeps 
askin about missing clients.dbf
I found the this this file in the directory and copied to the same 
directory where I keep the exe but it still keeps asking about the same 
file.


You have also to copy client.mdx which is the index.


What this DBF is doing in the demo project and do we have any plain demos?


A demo always has something more or less useful to do. Many people ask for
accessing data at server side.

I mean by plain: A demo which only shows how to use the components with 
out anything extra.


Then have a look at other demos... for example those I pointed to you in my
previous message.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be



- Original Message - 
From: daniel cc dan...@signedsource.com

To: ICS support mailing twsocket@elists.org
Sent: Thursday, January 13, 2011 2:42 PM
Subject: Re: [twsocket] TWSocket



Hi Francois,
I am trying to test this server demo,
OverbyteIcsSrvDemo but I simply can't move it anywhere because it keeps 
askin about missing clients.dbf
I found the this this file in the directory and copied to the same 
directory where I keep the exe but it still keeps asking about the same 
file.


I would very much like to know,
What this DBF is doing in the demo project and do we have any plain demos?
I mean by plain: A demo which only shows how to use the components with 
out anything extra.


Best regards

-Original Message- 
From: Francois PIETTE

Sent: Thursday, January 13, 2011 12:46 PM
To: ICS support mailing
Subject: Re: [twsocket] TWSocket

Server is placed in our office and clients are all around the country in 
different locations.


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TWSocket

2011-01-13 Thread daniel cc

Hi Francois,
You have mentioned DES encryption,
Is it automatically encrypted with DES?
or should I do something to set DES up?

Thanks for the answers.

-daniel

-Original Message- 
From: daniel cc

Sent: Thursday, January 13, 2011 5:02 PM
To: ICS support mailing
Subject: Re: [twsocket] TWSocket

OK, but what are the project names ? There are so much. I suggest you start
your prohramming from OverbyteIcsSvcTcp.dproj (A windows service) or
OverbyteIcsSrvTcp (A GUI application). Both demos are using the same object
to implement the server operation. Making them SSL enabled is quite easy but
I'm not sure you really need SSL since you design both client and server,
you may use basic encryption such as DES which is included in ICS. Depends
on your requirements. For client side, OverbyteIcsCliDemo.dproj is probably
more than enough to get you started. 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TWSocket

2011-01-13 Thread daniel cc

Thanks Arno,
I have managed to set it up and it works great :)
I just need to set some security around it now.

Best regards

-daniel

-Original Message- 
From: Arno Garrels 
Sent: Thursday, January 13, 2011 7:34 PM 
To: ICS support mailing 
Subject: Re: [twsocket] TWSocket 


daniel cc wrote:

I have copied everything belong to the database but it still keeps
complaining about not finding clients.dbf
I have the both,
clients.dbf and clients.mdx

Is there anything else missing?


Are you using C++ Builder?

Anyway, dropped on the form there's component DataTable of 
type TTable. Either set its property DataBaseName to the 
directory containing clients.dbf and clients.mdx in 
Object Inspector or at runtime. The Delphi demo sets this 
at runtime in procedure TSrvForm.FormShow(Sender: TObject); 
[..]

DataTable.DataBaseName := ExtractFilePath(Application.ExeName);
try
   DataTable.Open;
[..]


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TWSocket

2011-01-13 Thread daniel cc

Hi guys,
Could someone please provide me with a demo of SSL Server and client?
I couldn't find any in the component directory.
I don't know how to switch the existed normal server and client demos to 
SSL.


Thanks for the help

-daniel

-Original Message- 
From: Arno Garrels

Sent: Thursday, January 13, 2011 8:12 PM
To: ICS support mailing
Subject: Re: [twsocket] TWSocket

daniel cc wrote:

I just need to set some security around it now.


Encryption is not a built-in ICS feature, except when
you use SSL/TLS.

Just send encrypted data and decrypt on the receiver
side, very simple. There are many encryption libraries
available such as TP Lockbox or DCPCrypt2 both available
at sourceforge.net.
However best security is achieved with SSL/TLS.

--
Arno Garrels

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


  1   2   >