Re: [twsocket] Skype like application

2012-12-22 Thread brian -
You are best off asking at http://stackoverflow.com/ instead.

On Sat, Dec 22, 2012 at 1:49 PM, Paul paul.blommae...@telenet.be wrote:

 Hi all,

 I want to make an application to that can receive streaming camera images
 using udp hole punching.

 I found this link the net, but I have no clue of how to start with it.
 http://www.brynosaurus.com/**pub/net/p2pnat/http://www.brynosaurus.com/pub/net/p2pnat/

 Is there someone that can get me started with this ?


 Paul
 --
 To unsubscribe or change your settings for TWSocket mailing list
 please goto 
 http://lists.elists.org/cgi-**bin/mailman/listinfo/twsockethttp://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] Skype like application

2012-12-22 Thread brian -
Because your question/topic is much broader than what is usually discussed
in these simple mailing lists, mostly used for discussion/issues related to
ICS itself rather than asking for extensive help in making an application.

At Stack however you'll reach a much larger audience who often post code
and lots of related information/related questions to raise their points/etc
and it's a much better platform for discussion than this thread of mails.

On Sat, Dec 22, 2012 at 3:06 PM, Paul paul.blommae...@telenet.be wrote:

 You are best off asking at http://stackoverflow.com/ instead.

  Any good reason for that ?

 I want to make it with ICS


 Paul
 --
 To unsubscribe or change your settings for TWSocket mailing list
 please goto 
 http://lists.elists.org/cgi-**bin/mailman/listinfo/twsockethttp://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] THttpCli - How to know what URL is requested?

2012-12-21 Thread brian -
I think when OnLocationChange triggers, Location already has the new URL.

On Fri, Dec 21, 2012 at 5:06 AM, Albert Wiersch
supp...@htmlvalidator.comwrote:


  -Original Message-
  From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
 On
  Behalf Of brian -
 
  Then it should be Location.
 
  checking LocationChange and RequestDone for the loc ends in the same
 final
  URL at the end, going from .com to the localized domain

 Hello,

 I would assume 'Location' would be the URL on the RequestDone() event, but
 how
 do you determine the current URL in a LocationChange() event? You wouldn't
 know (for sure) whether it is  URL or whether it was the previous value in
 Location.

 I think I came up with a method of getting the 'current URL' though, using
 two
 variables 'lastloc' and 'currloc':

 1. In OnLocationChange(), I set 'lastloc' to Location.
 2. In OnRequestHeaderBegin(), I set 'currloc' to the value of 'lastloc'
 (if it
 exists).
 3. To get the true current location of the request, I check 'currloc' and
 use
 that if there is a value assigned, otherwise I use the 'URL' property.

 If one just uses the 'Location' property, it's not always the current URL
 - at
 least not until the OnRequestHeaderBegin() event... in fact, the current
 URL
 could be a previous value of 'Location', if there was more than one
 location
 change.

 Am I making sense? :)

 Does the above method make sense or does someone know an easier way? Or am
 I
 making this too complicated?

 I need the 'real' URL to handle cookies properly. I need the current URL in
 OnCookie, and if there is a location header before the cookie header, then
 the
 Location property is not the current URL for the cookie... the URL property
 might be, but it could also have been the previous value of Location if
 there
 was more than one relocation. See the problem? :)

 Thanks,
 Albert

 --
 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] THttpCli - How to know what URL is requested?

2012-12-21 Thread brian -
Maybe skip grabbing the cookies when request code result is 302 (redirect
etc)

On Fri, Dec 21, 2012 at 1:53 PM, brian - hikarito...@gmail.com wrote:

 I think when OnLocationChange triggers, Location already has the new URL.


 On Fri, Dec 21, 2012 at 5:06 AM, Albert Wiersch supp...@htmlvalidator.com
  wrote:


  -Original Message-
  From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
 On
  Behalf Of brian -
 
  Then it should be Location.
 
  checking LocationChange and RequestDone for the loc ends in the same
 final
  URL at the end, going from .com to the localized domain

 Hello,

 I would assume 'Location' would be the URL on the RequestDone() event,
 but how
 do you determine the current URL in a LocationChange() event? You wouldn't
 know (for sure) whether it is  URL or whether it was the previous value in
 Location.

 I think I came up with a method of getting the 'current URL' though,
 using two
 variables 'lastloc' and 'currloc':

 1. In OnLocationChange(), I set 'lastloc' to Location.
 2. In OnRequestHeaderBegin(), I set 'currloc' to the value of 'lastloc'
 (if it
 exists).
 3. To get the true current location of the request, I check 'currloc' and
 use
 that if there is a value assigned, otherwise I use the 'URL' property.

 If one just uses the 'Location' property, it's not always the current URL
 - at
 least not until the OnRequestHeaderBegin() event... in fact, the current
 URL
 could be a previous value of 'Location', if there was more than one
 location
 change.

 Am I making sense? :)

 Does the above method make sense or does someone know an easier way? Or
 am I
 making this too complicated?

 I need the 'real' URL to handle cookies properly. I need the current URL
 in
 OnCookie, and if there is a location header before the cookie header,
 then the
 Location property is not the current URL for the cookie... the URL
 property
 might be, but it could also have been the previous value of Location if
 there
 was more than one relocation. See the problem? :)

 Thanks,
 Albert

 --
 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] THttpCli - How to know what URL is requested?

2012-12-20 Thread brian -
You can use the OnLocationChange event to know when the URL changed.

On Thu, Dec 20, 2012 at 4:10 PM, Albert Wiersch
supp...@htmlvalidator.comwrote:


 How can I know what URL was last requested?

 The URL property seems to always be the original URL, so this doesn't
 work
 in the case of a redirection.
 The Location property seems to indicate the last value of the location
 property that was received, and is sometimes, but not always the URL of the
 current request.

 Is there an easy way to do always know the URL of the current request when
 redirections are used? Or do I have to use more complicated method than
 simply
 accessing a property?

 I would think this is very important for proper cookie handling, because
 cookies always need to be based on the current URL (as far as I know
 anyway).

 Thanks,
 Albert Wiersch
 AI Internet Solutions LLC
 supp...@htmlvalidator.com
 http://www.htmlvalidator.com/



 --
 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] THttpCli - How to know what URL is requested?

2012-12-20 Thread brian -
Then it should be Location.

checking LocationChange and RequestDone for the loc ends in the same final
URL at the end, going from .com to the localized domain

procedure TForm1.HttpCli1LocationChange(Sender: TObject);
 begin
   memo1.Lines.Add(HttpCli1.CtrlSocket.Addr);
   memo1.Lines.Add(HttpCli1.Location);
 end;
 procedure TForm1.HttpCli1RequestDone(Sender: TObject; RqType:
 THttpRequest; ErrCode: Word);
 begin
   memo1.Lines.Add(HttpCli1.Location);
 end;


Do you have a URL where this isn't the case to test?

On Thu, Dec 20, 2012 at 10:21 PM, Albert Wiersch
supp...@htmlvalidator.comwrote:


  -Original Message-
  From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
 On
  Behalf Of brian -
 
  You can use the OnLocationChange event to know when the URL changed.

 That seems to let me know when the 'Location' property changes (like in
 response to a 'Location' HTTP header), but that property doesn't always
 indicate the correct URL of the current request.

 Albert


 --
 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] THttpCli - How to know what URL is requested?

2012-12-20 Thread brian -
*for Google.com
--
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] Modify header before send

2012-12-13 Thread brian -
Hi, posted this a while ago, Feb 21st, 2011, and it had no response.
Thought I'd bring it up again, as maybe I'm missing something and this is
possible some other easier way? (though it doesn't seem like from looking
at the code, there's nothing to allow custom headers besides the triggered
event)

Original message: (lines won't match with current version)


I made a small modification to OverbyteIcsHttpProt, maybe it can be sorted
for the next version.
OverbyteIcsHttpProt :
I made a small change to modify the headers before sending a request. I
know there is an event for it, OnBeforeHeaderSend, however that's not quite
handy. Usually you need add something to the header just before the call,
so to use the event you would have to set a flag or something that adds the
header only in case of certain calls.. like, let's say, you are gonna make
a few gets or posts, but only need to modify the header for one of them,
it's not really convenient then to use the event if you are using the same
socket object for all the calls. Isn't it more handy if you can just modify
it before your call? So I changed the following:
589: FExtraSendHeader  : String;
914: property ExtraSendHeader : String read  FExtraSendHeader
 write  FExtraSendHeader;
2405:// 2011, before TriggerBeforeHeaderSend
if FExtraSendHeader  '' then
begin
Headers.Add(FExtraSendHeader);
FExtraSendHeader := '';
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] Know the method used inside OnRequestDone?

2012-12-12 Thread brian -
RqType: THttpRequest;

this holds the request type, such as get, post, put, head etc.

On Wed, Dec 12, 2012 at 3:12 PM, Bruno Mannina bmann...@free.fr wrote:

 Dear ICS User,

 Is exist a way to know inside the OnRequestDone if the command done was a
 POST or a GET ?

 Thanks,
 Bruno
 --
 To unsubscribe or change your settings for TWSocket mailing list
 please goto 
 http://lists.elists.org/cgi-**bin/mailman/listinfo/twsockethttp://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] deflate for OverbyteIcsHttpCCodZLib

2012-12-10 Thread brian -
Yes, including it in the project source is enough, but maybe this should be
clearly noted somewhere for other devs, as by default you'd think just
setting the Options should be enough.

On Mon, Dec 10, 2012 at 7:48 PM, Maurizio Lotauro
lotauro.mauri...@dnet.itwrote:

 Scrive brian - hikarito...@gmail.com:

  This seems to be finally fixed in the latest Daily/SVN, the data received
  is transparently uncompressed etc.
 
  HOWEVER, there is a small issue, which isn't readily apparent unless you
  check received data size etc:
 
  If you don't include OverbyteIcsHttpCCodZLib anywhere in your app, it
 won't
  be used at all even if you add content encoding in the httpcli object
  options, so the getcoding/complete calls use the default
  in OverbyteIcsHttpContCod instead and gzip isn't really used.

 It should be so by design (at least at time I wrote it). But it must be
 enough to
 include it one time.


 Bye, Maurizio.


 
 This mail has been sent using Alpikom webmail system
 http://www.alpikom.it

 --
 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] exception after THttpCli.ReqDone causes double triggerof RequestDone

2012-12-10 Thread brian -
I see. Thanks for the explanation and the workaround :)

On Mon, Dec 10, 2012 at 7:17 AM, Arno Garrels arno.garr...@gmx.de wrote:

 brian - wrote:
  After RequestDone with THttpCli, if there is an -unhandled- exception
  before the code is out of ReqDone stack, RequestDone is triggered
  again.

 [..]

  You will see RequestDone is triggered twice, and external exception
  handlers or delphi's don't trigger at all (e.g madExcept).

 If you want MadExcept handle those exceptions add i.e. these lines

 initialization
   SetIcsThreadLocalFinalBgExceptionHandling(fehAppHandleException);

 This tells ICS to call the global Application's exception handler
 for any unhandled background exception in main thread context rather
 than eat unhandled exceptions.

  I know I can solve this by using try/except on the final code, or
  using BgException (canclose := False),

 Indeed it's best practice to catch and handle all exceptions in the
 event handlers.

  but why is this happening?

 It happens because Abort is called by default on unhandled exceptions
 which in turn calls OnRequestDone() again.

 --
 Arno
 --
 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] deflate for OverbyteIcsHttpCCodZLib

2012-12-09 Thread brian -
This seems to be finally fixed in the latest Daily/SVN, the data received
is transparently uncompressed etc.

HOWEVER, there is a small issue, which isn't readily apparent unless you
check received data size etc:

If you don't include OverbyteIcsHttpCCodZLib anywhere in your app, it won't
be used at all even if you add content encoding in the httpcli object
options, so the getcoding/complete calls use the default
in OverbyteIcsHttpContCod instead and gzip isn't really used.

On Mon, Oct 8, 2012 at 10:50 AM, Angus Robertson - Magenta Systems Ltd 
an...@magsys.co.uk wrote:

  Tested with this website http://myanimelist.net/malappinfo.php
 
  If I enable content encoding, then the data received isn't
  compressed unless I add deflate.

 Whether the site compresses the data is not the issue, it's whether the
 ICS component can decompress anything with the change you proposed.  And
 my testing shows not.

 I suspect I know the reason, if a compression type of 'gzip, deflate' is
 added, it expects exactly that string to be returned, the component does
 not parse the separate words.

 Your test site also does not use deflate, testing with the ICS browser
 demo gives:

 [0]  GET /malappinfo.php HTTP/1.1
 [0]  Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
 [0]  Connection: Keep-Alive
 [0]  Accept-Encoding: gzip, deflate

 [0]  HTTP/1.1 200 OK
 [0]  Date: Mon, 08 Oct 2012 08:41:14 GMT
 [0]  Server: Apache/2
 [0]  X-Powered-By: PHP/5.1.6
 [0]  Vary: Accept-Encoding
 [0]  Content-Encoding: gzip
 [0]  X-Served-By: app2v-mal.ao.prd.lax
 [0]  Content-Length: 76

 so it returns gzip not deflate, and ICS fails to decode the XML.

 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] exception after THttpCli.ReqDone causes double trigger of RequestDone

2012-12-09 Thread brian -
Hi, been experiencing something kinda odd, not sure if this is on purpose
or a bug somewhere:

After RequestDone with THttpCli, if there is an -unhandled- exception
before the code is out of ReqDone stack, RequestDone is triggered again.
Try the following code:

  httpcli1.RcvdStream := tmemorystream.Create;
   httpcli1.URL := 'google.com';
   httpcli1.Get;

 procedure TForm1.HttpCli1RequestDone(Sender: TObject; RqType:
 THttpRequest; ErrCode: Word);
 var ts: tstringlist;
 begin
   if rqtype  httpGET then exit;
   memo1.Lines.Add('req done');
   ts := tstringlist.Create;
   ts.Add('sdfdsf'); // 0
   caption := ts[1]; // list out of bounds, 0..1..2
 end;


You will see RequestDone is triggered twice, and external exception
handlers or delphi's don't trigger at all (e.g madExcept).
I know I can solve this by using try/except on the final code, or using
BgException (canclose := False), but why is this happening?
--
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] deflate for OverbyteIcsHttpCCodZLib

2012-10-08 Thread brian -
Hmm it may be an issue with the site then; the XML is part of an API used
by some applications, I haven't see others have an issue with this however.

From my testing:

- Using only gzip: the XML is not encoded but ICS think it is, therefore
trying to decode non-encoded data, resulting in an error. (tested with my
user there, I get uncompressed xml with ~780 KB)
- Using gzip, deflate: XML is encoded/compressed, size is around 67 KB

On my end, I use this code with Zlib to decode after receiving the data
(after Get request finished successfully)

// 1 = utf8 failed, defaulted to ansi
 function LoadTSListFromGzipMS(var ts: TStringList; SrcMS: TStream;
 useUTF8: Boolean): byte;
 var ms: TMemoryStream;
 begin
ms := TMemoryStream.Create;
SrcMS.Seek(0,0);
  ZlibEx.ZDecompressStream2(SrcMS,ms,15+32);
  ms.Position := 0;
  Result := 0;
  if useUTF8 then
   ts.LoadFromStream(ms, TEncoding.UTF8)
  else
   ts.LoadFromStream(ms);
  if useUTF8 and (ts.Count = 0) then begin
ms.Position := 0;
ts.LoadFromStream(ms);
Result := 1;
  end;
  ms.Free;
 end;



On Mon, Oct 8, 2012 at 10:50 AM, Angus Robertson - Magenta Systems Ltd 
an...@magsys.co.uk wrote:

  Tested with this website http://myanimelist.net/malappinfo.php
 
  If I enable content encoding, then the data received isn't
  compressed unless I add deflate.

 Whether the site compresses the data is not the issue, it's whether the
 ICS component can decompress anything with the change you proposed.  And
 my testing shows not.

 I suspect I know the reason, if a compression type of 'gzip, deflate' is
 added, it expects exactly that string to be returned, the component does
 not parse the separate words.

 Your test site also does not use deflate, testing with the ICS browser
 demo gives:

 [0]  GET /malappinfo.php HTTP/1.1
 [0]  Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
 [0]  Connection: Keep-Alive
 [0]  Accept-Encoding: gzip, deflate

 [0]  HTTP/1.1 200 OK
 [0]  Date: Mon, 08 Oct 2012 08:41:14 GMT
 [0]  Server: Apache/2
 [0]  X-Powered-By: PHP/5.1.6
 [0]  Vary: Accept-Encoding
 [0]  Content-Encoding: gzip
 [0]  X-Served-By: app2v-mal.ao.prd.lax
 [0]  Content-Length: 76

 so it returns gzip not deflate, and ICS fails to decode the XML.

 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] deflate for OverbyteIcsHttpCCodZLib

2012-10-04 Thread brian -
Please add the following modification to OverbyteIcsHttpCCodZLib, I was sad
to see it's not yet included in the last V8 : ( I reported this long ago )

class function THttpCCodzlib.GetCoding: String;
begin
Result := 'gzip, deflate';
end;

The original code only has gzip, which fails to properly receive data from
some web services.
--
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] How to install Firemonkey beta pack for XE2

2012-04-12 Thread brian -
Followed the notes, now I get a different error when trying to install any
of the 3 design-time packages:

http://img21.imageshack.us/img21/8727/201204120943.png
--
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] How to install Firemonkey beta pack for XE2

2012-04-12 Thread brian -
At first yes, then I tried to uninstall the old VCL and delete all the
older files first, then proceeded with the fmx beta. Used the -nocache
option as well.
--
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] How to install Firemonkey beta pack for XE2

2012-04-09 Thread brian -
Are there any special steps to follow for installing the beta ICS package
(from svn) for Firemonkey? Tried to install it separately, and it gives an
error

The procedure entry point @Overbyteicslibrary@initialization$qqrv could
not be located in the dynamic link library
OverbyteIcsDXe2Run.bpl

http://i.imgur.com/PiT9o.png
--
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] Should next ICS version support anything before Delphi XE ?

2012-04-08 Thread brian -
Ive had almost all versions from 1 to XE2, except 6 and those .net (8?).
Ported all my apps to XE2 and not looking back. Mostly looking forward to
Firemonkey support.
--
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] OnDataAvailable

2012-01-31 Thread Brian Culverwell
I had a similar problem when converting to XE2 from Delphi7 - my TwSocket
component was designed to send a header string containing the length of the
data to follow, and then I would read that bit to get the actual data - and
then process it - but with XE2 being unicode aware - suddenly I had extra
characters in the actual transmitted message - so the counter at the
beginning of the data did not match the actual data - and therefore there
was still stuff to receive (still in the buffer) so it hung the client up.

Regards
Brian

On Wed, Feb 1, 2012 at 4:20 AM, mfisc...@bfe.tv wrote:


 Hi,
 i am using the Standard TWSocket in a Server and round about 5 Clients
 without
 LineMode. After a Client is connected to the Server, the Client starts
 immediately to send text messages. After some sort of filtering the
 messages
 are broadcasted to a subset of all connected Clients. If i start the sever
 and
 5 clients through a script on a single Windows 7 PC the following error
 occurs: After a few Bytes are exchanged one or two of the clients no longer
 call the
 callback function for OnDataAvailable. The ServerSocket and and the
 ClientSocket stay in state
 wsConnected. If i look at WireShark the Data is still transmitted from
 Server
 to Client.
 If the ClientSocket is closed, the callback for OnDataAvailable is
 triggered
 and the missing
 Bytes are received.
 Any idea in which direction my problem could be located?
 Thanks,
  M. Fischer
 --
 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] Help with stalling ftp client

2012-01-31 Thread Brian Culverwell
before each STOR

On Wed, Feb 1, 2012 at 6:27 AM, Info2004 info2...@asamicros.com wrote:

 On 31/01/2012 19:05, Brian Culverwell wrote:

 probably your backend ftp server has been changed to 'binary' type - and
 when receiving your request to STOR the .csv file - it is issuing a type A
 to change the mode to ASCII

 You could force the Type A before issuing your STOR.


 Brian,

 Do you mean to set ascii initially after logging on, or before each STOR
 (PutAsync) ?

 Regards,

 Andy

 --
 To unsubscribe or change your settings for TWSocket mailing list
 please goto 
 http://lists.elists.org/cgi-**bin/mailman/listinfo/twsockethttp://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] SITE EXEC issue

2012-01-30 Thread Brian Culverwell
Hi

I have a client ftp component written using ICS and a server component also
using ICS - everything was grand up to about 2 weeks ago, when the client
ftp was sending a SITE EXEC progname to the server - now that command
never even gets received (and therefore never executes).  This smells of
anti-virus or something but it is just the SITE EXEC that does not work -
everything else is fine.

Regards
Brian
--
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] SITE EXEC issue

2012-01-30 Thread Brian Culverwell
Thanks Angus and Francois - will try both your recommendations!

Brian

On Tue, Jan 31, 2012 at 6:42 AM, François Piette
francois.pie...@skynet.bewrote:

 I have a client ftp component written using ICS and a server component
 also
 using ICS - everything
 was grand up to about 2 weeks ago, when the client ftp was sending a SITE
 EXEC progname to
 the server - now that command never even gets received (and therefore
 never executes).
  This smells of anti-virus or something but it is just the SITE EXEC that
 does not work - everything else is fine.

 Use a sniffer - such as the free WireShark - see if it is a client side or
 server side issue. Using the sniffer, you'll see if the client correctly
 send the request or not. Then we may help you debug the client or server.


 --
 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] 64 bit SSL

2011-10-08 Thread brian -
Hi, I'm trying to convert a project to 64 bit with XE2, and encounter this
issue with SSL, I get an exception:

exception class EIcsLibeayException with message Unable to load
LIBEAY32.DLL, %1 is not a valid win32 application

Is there any workaround for this?
--
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] TTwitter component

2011-03-04 Thread brian -
v0.33 up with xAuth/SSL support.

On Mon, Feb 28, 2011 at 4:02 PM, brian - hikarito...@gmail.com wrote:

 http://dev.twitter.com/pages/auth_overview

 http://dev.twitter.com/pages/auth_overviewThere's xAuth to skip the PIN
 step, but requires the twitter user/pass.
 Also I made a method in my lib to do almost like xAuth, simulating a
 browser login, catching the cookies and posting the form etc to retrieve the
 data, but that's prone to fail.

 I do like the PIN step to be honest, it's only required once and the user
 will feel more secure not giving their login details.


 On Mon, Feb 28, 2011 at 3:34 PM, Anton S. an...@rambler.ru wrote:

 There's already a method through httpcli, but PIN approach should always
 be
 encouraged.
 I don't know what PIN is but couldn't it be implemented without external
 apps/activeX?

 --
 Anton
 --
 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] TTwitter component

2011-02-28 Thread brian -
There's already a method through httpcli, but PIN approach should always be
encouraged.

v0.32 up

On Mon, Feb 28, 2011 at 10:32 AM, Anton S. an...@rambler.ru wrote:

 TWebbrowser? ShellExec?? Chromium?? Why don't you use ICS HTTPCli for
 authorizing? You may even display an original page with powerful ThtmlViewer
 component.

 --
 Anton
 --
 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] TTwitter component

2011-02-28 Thread brian -
http://dev.twitter.com/pages/auth_overview

http://dev.twitter.com/pages/auth_overviewThere's xAuth to skip the PIN
step, but requires the twitter user/pass.
Also I made a method in my lib to do almost like xAuth, simulating a browser
login, catching the cookies and posting the form etc to retrieve the data,
but that's prone to fail.

I do like the PIN step to be honest, it's only required once and the user
will feel more secure not giving their login details.

On Mon, Feb 28, 2011 at 3:34 PM, Anton S. an...@rambler.ru wrote:

 There's already a method through httpcli, but PIN approach should always
 be
 encouraged.
 I don't know what PIN is but couldn't it be implemented without external
 apps/activeX?

 --
 Anton
 --
 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] TTwitter component

2011-02-27 Thread brian -
Updated the library and uploaded to my site to reflect this modification.

Sadly though, OverbyteIcsHttpCCodZLib is still problematic, I have to keep
using the modified version to make it work.

On Sun, Feb 27, 2011 at 7:56 AM, Francois PIETTE
francois.pie...@skynet.bewrote:

 I will modify the code to use a variable for this outside the ics
 unit, as this will create only extra complication when a new ICS is
 available.


 Good :-)


  But, you mention it's very different from your current one, do you mean a
 new version still in development? since I have the latest distribution
 available from your website, unless I've missed a link to a beta or newer
 version :)


 The latest version is always available from the subversion repository
 (svn://svn.overbyte.be/ics/trunk or daily snapshot). The zip file at
 www.overbyte.be is updated only once or twice a year at some fixed
 milestones.
 See 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


Re: [twsocket] TTwitter component

2011-02-27 Thread brian -
Don't see an attached message in your reply :( but anyway, lurking through
the archives some time ago I found someone submitted a modification to
apparently fix this problem, but that still didnt work for me.
Changing this in OverbyteIcsHttpCCodZLib did the trick though:

55: Result := 'gzip, deflate';

Simply added deflate to the result. Without that, I don't get any data back.

On Sun, Feb 27, 2011 at 3:05 PM, Francois PIETTE
francois.pie...@skynet.bewrote:

 Updated the library and uploaded to my site to reflect this modification.


 Super !


  Sadly though, OverbyteIcsHttpCCodZLib is still problematic, I have to keep
 using the modified version to make it work.


 I can't find your unit.
 Is it the chnage that Henri Gourvest published (see attached message) and
 which never reached the source code ?


 --
 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] TTwitter component

2011-02-27 Thread brian -
posted an update to my lib:
http://eden.fm/2011/02/27/another-twitter-library-update-v0-3/
http://eden.fm/2011/02/27/another-twitter-library-update-v0-3/You can now
use an alternate method to wont require the user to visit the twitter site
to get the PIN code, the app will simulate a browser login, catch the
cookies and proceed to auth on its own to retrieve the PIN.

the issue about OverbyteIcsHttpCCodZLib  is not related to this twitter
library, just in general, if you try to retrieve a page with GZip there's no
data returned.

On Sun, Feb 27, 2011 at 5:54 PM, RTT p...@sapo.pt wrote:

 On 27-02-2011 16:01, brian - wrote:

 Simply added deflate to the result. Without that, I don't get any data
 back.

 Juts tested your component here, without that modification, and works just
 fine. What exactly happen in your case. What data you don't get?

 --
 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] TTwitter component

2011-02-27 Thread brian -
Ahh thanks, should have looked there first :) replaced it now.

Download link should work now.

On Sun, Feb 27, 2011 at 6:45 PM, RTT p...@sapo.pt wrote:


 You can remove the b64ASM.pas dependency using the ICS equivalent

  //b64asm.Base64Encode(HMAC_SHA1_EX(SignBase,signkey));
  OverbyteIcsMimeUtils.Base64Encode(HMAC_SHA1_EX(SignBase,signkey));

 Probably not so fast, but not really important in this case of small length
 strings.



 --
 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] TTwitter component

2011-02-27 Thread brian -
that alternate method was mostly a test to see if I could make it work, I
still encourage using the PIN system :) I like it tbh, even with the
annoyance of havign to login and retrieve the pass for the user, it's only
required once.
ill most likely remove this alternate proc in next revision, and add XAuth
support instead.


On Sun, Feb 27, 2011 at 7:25 PM, RTT p...@sapo.pt wrote:

 On 27-02-2011 17:18, brian - wrote:

 use an alternate method to wont require the user to visit the twitter site
 to get the PIN code, the app will simulate a browser login, catch the
 cookies and proceed to auth on its own to retrieve the PIN.

 This will work until twitter decide to change these html pages.
 But with Twitter you can even bypass the need of a PIN. Just remove all the
 oauth_verifier references and you will see that works without PIN.


 --
 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] TTwitter component

2011-02-27 Thread brian -
hmm interesting, I will test about the PIN; I guess Twitter associates the
1st auth token with the user's account after they allow the app.
I don't really like the idea of embedding the TWebBrowser object, bulky and
buggy activex stuff.

On Sun, Feb 27, 2011 at 8:18 PM, RTT p...@sapo.pt wrote:

 On 27-02-2011 18:39, brian - wrote:

 I like it tbh, even with the
 annoyance of havign to login and retrieve the pass for the user, it's only
 required once.


 As I said, Twitter don't require the PIN, so you can ignore that step. User
 only need to authorize the application, and forget about the PIN.
 Instead of using the ShellExecute to open the browser, you can use the
 TTwitter approach.  Start a modal Request Authorization form with a
 TWebBrowser pointed to that address. This way you can proceed with the
 RequestAccess after user close that authorization form.
 Using this idea, another thing you could do to make your component more
 user friendly, is to execute internally all the authentication steps, the
 first time they are needed. User will just need to create the component and
 call the SendTwit method. The callback will be used only to get the
 success/unsuccess of the send.


  ill most likely remove this alternate proc in next revision, and add XAuth
 support instead.


 With both methods you should use SSL, or you will be passing user and
 password in plain text.

 --
 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] TTwitter component

2011-02-27 Thread brian -
I was actually 'open' for years, but I've been seeing users not able to
launch urls from my apps with that, cause the default browser may not have
defined that command, was still using it in the first versions of twitter
lib. I added the ShellExecute import to avoid adding another unit; I rather
not include entire units for things where I need only a couple procs and
such, it adds up to the exe unnecesarily.

As for webbrowser, hmm, I think I still prefer either the PIN or self-auth
approach, else, how we know the user actually allowed the app, we can't just
blindly assume they'll do and think we are now authorized, so the last PIN
step takes care of that.

I read somewhere about embedding a chromium window in delphi btw, heard
anything? I'm curious to test, gonna check for it. I really still dont like
the twebbrowser at all. But maybe I could have a compiler conditional so the
user can opt for a way or another.

Doesn't GPL allow your code to be included in closed source applications as
well? as long as the code hasnt been modified; unless I understood it all
wrong. Tbh it's the first time in over ~12 years programming Im opening up
to release and share source code, so I never looked much into open source
licenses until just now. Would appreciate some insight about it :)

On Mon, Feb 28, 2011 at 12:08 AM, RTT p...@sapo.pt wrote:

 On 27-02-2011 19:29, brian - wrote:

 I don't really like the idea of embedding the TWebBrowser object, bulky
 and
 buggy activex stuff.


 The WebBrowser control works very well for this simple navigate to a page
 task.
 If you want to test, just replace your RequestPIN code with the next one.

   uses
   forms, ShDocVw, Controls;
   ...

   procedure TwitterCli.RequestPIN;
   var
  AuthForm: TForm;
  WebBrowser: TWebBrowser;
   begin
  AuthForm := TForm.create(application.MainForm);
  with AuthForm do
  begin
BorderStyle := bsDialog;
Caption := 'Twitter Authorization - Authorize and close this
   dialog';
width := screen.width - screen.width div 5;
height := screen.height - screen.height div 5;
Position := poScreenCenter;
  end;
  WebBrowser := TWebBrowser.Create(authForm);
  TWinControl(WebBrowser).Parent := authForm;
  WebBrowser.Align := alClient;
  WebBrowser.Navigate(RequestPinURL);
  authForm.ShowModal;
  authForm.free;
   end;


 Also, if you in the end decide to maintain the ShellExecute, then better
 specify the 'Open' verb. Some system may have the default verb defined
 differently.

ShellExecute(0, 'open', PChar('
 https://twitter.com/oauth/authorize?oauth_token=' + OAuthToken), '', '',
 SW_SHOWNORMAL);

 And you don't need to declare the ShellExecute import, just use the one
 defined in the ShellAPI unit.

 ---
 Why you decided to use the GPL v3?
 IMHO, for small , and simple, code projects like this one, better use a
 license that can be used in closed code applications, or commercial users
 will just grab/mangle the code and don't give you any credit.
 If credit is given, they will need to open the code too, and that isn't
 going to happen. On the other hand, if license permits closed code, they
 have no problem to include the reference.





 --
 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] TTwitter component

2011-02-26 Thread brian -
Ok, here's my twitter implementation :

http://eden.fm/2011/02/27/twitter-library-for-delphi/

On Tue, Feb 22, 2011 at 12:13 PM, Francois PIETTE francois.pie...@skynet.be
 wrote:

 You should really consider making in freeware/opensource.
 You'll gain something: other people will find bugs and make enhancements.
 Your own applications will then be better. And you'll enter the hall of
 fames :-)


  Always been a bit skeptic about open source,
 how do you make money from that :)


 I do money with freeware. Well, not directly.

 You may not know it, but I'm an independant consultant, full time. A
 significant part of my customers have found me because of my freeware. I
 simply provide custome development, training, consultancy and other similar
 activity. Many companies have some developers finding my components, then
 they start writing their application and discover that they lack some
 resource or knowledge to build their application, or their application
 require some changes in the components. Then I'm here ! They hire me and I
 earn some money.

 Also, making the components freeware makes it better. People find bugs and
 added enhancements. My own applications benefit from that as well. They are
 more robust. You must really make a difference between components and
 applications ! I make frewware components, not applications.


 --
 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] TTwitter component

2011-02-26 Thread brian -
Hi :)

I actually send a mail to the list about this change:

sender-time Sent at 11:37 PM (GMT+01:00). Current time there: 7:27 AM. ✆
 to ICS twsocket@elists.org
 date Mon, Feb 21, 2011 at 11:37 PM
 subject THttpCli modification request, and gzip fix


I made that minor change to ease the header modifications just before the
calls, because else we have to use an extra variable and then check in the
beforeheader event; guess I could have it done on the app side, but this
seemed more convenient at the time and I had a problem before using that
event which wrongly let me to believe the accessible headers there were
read-only. I will modify the code to use a variable for this outside the ics
unit, as this will create only extra complication when a new ICS is
available.
.
But, you mention it's very different from your current one, do you mean a
new version still in development? since I have the latest distribution
available from your website, unless I've missed a link to a beta or newer
version :)

On Sun, Feb 27, 2011 at 7:04 AM, Francois PIETTE
francois.pie...@skynet.bewrote:

 Hello Brian,


  Ok, here's my twitter implementation :
 http://eden.fm/2011/02/27/twitter-library-for-delphi/


 It is very generous to make it OpenSource. Thanks a lot.

 There is still one big issue with your code: it make use of a modified ICS
 unit. Using a modified version make it almost impossible to use to build a
 program using ICS for other things.

 I checked you modified unit (HTTP Client) and it has a lot of changes
 compared to mine. Most of the changes are because you started from an old
 version and is not related to your code. As far as I can see, you have done
 only one change: you have added a new ExtraSendHeader property to send one
 header line.

 You can achieve the exact same behaviour without modifiyng the component by
 using the OnBeforeHeaderSend event and just add your header line to the
 Headers argument. This is really a minor change in your code !

 Best 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


 --
 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] Why ICS prefers non-blocking sockets?

2011-02-22 Thread brian -
I much prefer non-blocking. While receiving data from a httpcli f.e or over
a slow connection etc, my app keeps running while waiting for data. without
having to complicate it all with extra threads for everything.

On Tue, Feb 22, 2011 at 2:26 PM, Zvone pha...@gmail.com wrote:

 When I looked at Indy and Ararat Synapse they both prefer blocking sockets
 to connect to text-based protocols like HTTP, POP, SMTP, FTP etc.

 The reason - because communication is flowed - you send command, you wait
 reply, if reply does not match you handle error. It is all nice
 line-by-line
 inline code.

 With ICS it uses events to reply to reply codes and non-blocking. But with
 this you lose - easy to follow code flow. If you really need to make it
 independent you simply put it in separate thread - both Indy and Synapse
 have their own way of solving this - Indy has special component for
 threading sockets and Synapse some kind of function that gets called every
 once in a while.

 It is all much better explained here why blocking is better:
 http://www.ararat.cz/synapse/doku.php/about

 So I am wondering why ICS prefers events when the code is so much simpler
 without them?
 --
 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] TTwitter component

2011-02-21 Thread brian -
I'm pretty sure I mailed mine a few years ago, but might as well send
another :) I just do see more and more people lately using Indy by default
since it started coming packed with Delphi, and they either don't know about
ICS or prefer the simplicity of Indy. I prefer ICS for the control it gives
me over everything that's going on, for the non-blocking calls, the
performance, the extra stuff, and overall how it works, it's really a great
piece of software, I use it in all my applications that required net access.
I see Indy for example has components even to manage Cookies, leaving the
user with no clue what's going on behind the scenes, I prefer handling that
myself.

On Sun, Feb 20, 2011 at 3:22 PM, Francois PIETTE
francois.pie...@skynet.bewrote:

 I don't get why ICS isnt more widely used,


 Well ICS is widely used. More than one hundred thousands download so far.
 And about four thousands registration (That's how many postcards I've
 receive so far. BTW: Have you mailed yours ?).


  it's imo far more advanced and gives you a lot more control
 over what's happening, besides the ASync calls which I just love :)


 Spread the word ! Blog about it ! Write in Embarcadero and other forums.
 Take part or FaceBook and Linked-In groups.


 --
 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] THttpCli modification request, and gzip fix

2011-02-21 Thread brian -
Hi,

I made a small modification to OverbyteIcsHttpProt
and OverbyteIcsHttpCCodZLib, maybe it can be sorted for the next version.

OverbyteIcsHttpProt :

I made a small change to modify the headers before sending a request. I know
there is an event for it, OnBeforeHeaderSend, however that's not quite
handy. Usually you need add something to the header just before the call, so
to use the event you would have to set a flag or something that adds the
header only in case of certain calls.. like, let's say, you are gonna make a
few gets or posts, but only need to modify the header for one of them, it's
not really convenient then to use the event if you are using the same socket
object for all the calls. Isn't it more handy if you can just modify it
before your call? So I changed the following:

589: FExtraSendHeader  : String;
914: property ExtraSendHeader : String read  FExtraSendHeader
   FExtraSendHeader;
2405:// 2011, before TriggerBeforeHeaderSend
if FExtraSendHeader  '' then
begin
Headers.Add(FExtraSendHeader);
FExtraSendHeader := '';
end;

This way you can do ExtraSendHeader := '..extra stuff', just before a GET or
POST, so it will be added to the next request and cleared for further calls.

OverbyteIcsHttpCCodZLib:

I added deflate because otherwise it wasn't working when I was trying to
retrieve a page with content-encoding on. Maybe I was doing something else
wrong? This fixed it though:

55: Result := 'gzip, deflate';

I found something about this in the archives, someone sent in a modification
to support deflate, but it still didn't work for me.
--
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] TTwitter component

2011-02-21 Thread brian -
Always been a bit skeptic about open source, how do you make money from that
:)

On Sun, Feb 20, 2011 at 3:23 PM, Francois PIETTE
francois.pie...@skynet.bewrote:

 closed source for now since im using it for another large project, and the
 libraries are not complete, it's mostly just the steps to auth with
 twitter
 and send the messages.


 :-(

 You should really consider making in freeware/opensource.
 You'll gain something: other people will find bugs and make enhancements.
 Your own applications will then be better. And you'll enter the hall of
 fames :-)


 --
 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] TTwitter component

2011-02-21 Thread brian -
I'll post the code in google code along with that tiny client :) it's
nothing major and my code is probably embarrassingly messy
and primitive though, I'm sure it can be improved a lot ^^ Just a small
clarification though, it's not a component, it's only a unit with an object
I called TTwitterCli, some properties and a few public procs, I never liked
the components approach much for non-visual objects.

will post back with a link

On Tue, Feb 22, 2011 at 4:51 AM, Marc Charbonneau
timebandit...@gmail.comwrote:

  Always been a bit skeptic about open source, how do you make money from
 that
  :)
 Just ask RedHat or Canonical, for example. Better yet, ask François !

 Like Jeff said, you're not open-sourcing your application, just the
 component.

 In return, you will get lots of debugging/testing and even
 improvements from other developers using your component. You can still
 sell your commercial app based on your component.

 B.t.w, hope you realize that your using open source components (ICS)
 to make money :)
 --
 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] TTwitter component

2011-02-20 Thread brian -
closed source for now since im using it for another large project, and the
libraries are not complete, it's mostly just the steps to auth with twitter
and send the messages. I saw someone else made an oauth for delphi already,
but didnt like it, too much use of classes for any little things and
overcomplicated, besides them using Indy. I don't get why ICS isnt more
widely used, it's imo far more advanced and gives you a lot more control
over what's happening, besides the ASync calls which I just love :)

On Sun, Feb 20, 2011 at 9:03 AM, Francois PIETTE
francois.pie...@skynet.bewrote:

 I made my own twitter and oauth libraries from scratch, full unicode
 support, with ICS :) Never liked Indy.
 http://eden.fm/twitmee/


 Good !
 Do you made it freeware/opensource ?
 I only see an exe file at the link you provided.


 --
 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] TTwitter component

2011-02-20 Thread brian -
I'm using it also for a plugin for this application: http://malupdater.com/
http://malupdater.com/All these posts are being sent by ICS ^^
http://twitter.com/#!/search?q=%23MalUpdater

On Sun, Feb 20, 2011 at 12:45 PM, brian - hikarito...@gmail.com wrote:

 closed source for now since im using it for another large project, and the
 libraries are not complete, it's mostly just the steps to auth with twitter
 and send the messages. I saw someone else made an oauth for delphi already,
 but didnt like it, too much use of classes for any little things and
 overcomplicated, besides them using Indy. I don't get why ICS isnt more
 widely used, it's imo far more advanced and gives you a lot more control
 over what's happening, besides the ASync calls which I just love :)


 On Sun, Feb 20, 2011 at 9:03 AM, Francois PIETTE 
 francois.pie...@skynet.be wrote:

  I made my own twitter and oauth libraries from scratch, full unicode
 support, with ICS :) Never liked Indy.
 http://eden.fm/twitmee/


 Good !
 Do you made it freeware/opensource ?
 I only see an exe file at the link you provided.


 --
 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] TTwitter component

2011-02-19 Thread brian -
I made my own twitter and oauth libraries from scratch, full unicode
support, with ICS :) Never liked Indy.

http://eden.fm/twitmee/

On Fri, Feb 18, 2011 at 3:57 PM, Francois PIETTE
francois.pie...@skynet.bewrote:

 OK, thanks for the infos.

 --
 francois.pie...@overbyte.be
 http://www.overbyte.be

 - Original Message - From: RTT p...@sapo.pt
 To: ICS support mailing twsocket@elists.org
 Sent: Friday, February 18, 2011 3:47 PM
 Subject: Re: [twsocket] TTwitter component



 On 18-02-2011 13:52, Francois PIETTE wrote:

 It starts to become interesting :-)
 What other dependency is there ?


 None

  What is the license for that component ? Could it be added to ICS
 distribution or ICS usermade web page ?


 From what I can see, MIT License for all the code from the author of
 the TTwitter component.
 It's using also a modified OAuth.pas, to deal with the OAuth stuff,
 under MPL, and a LkJSON unit, to parse json, that is stated at
 sourceforge as being BDS.

 You can check for yourself
 http://www.lakraven.com/delphi-stuff/ttwitter/

 But this project is currently beta, and it's really very incomplete and
 confuse. In the author site, in the comments, the author posted this,
 and I quote

 At present TTwitter only provides the means to read and post Tweets…
 more developments are very-much on the way. Currently I’m rewriting
 TTwitter to make use of a new “Social Delphi” component platform I’ve
 been developing… this new version of TTwitter will be releasing quite
 soon at the launch of the purpose-built website, along with components
 for other social networking websites such as Facebook etc. The new
 platform in-fact DOES allow you to bypass the TComponent layers and
 access the raw API’s directly if you wish (though I don’t expect many
 people will want to do that since the component layers make life so much
 easier)

 I do recommend you follow me on Twitter (@LaKraven) so you’ll be
 informed as soon as the new versions are available (on the new website)

 --
 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] Modifying headers before send in httpcli fails

2011-02-17 Thread brian -
I got this working, httpcli is just working as expect, was nothing wrong
with it. I will keep that extra variable for the headers anyway, it's a lot
more convenient than the notify event.

On Sun, Feb 13, 2011 at 3:54 AM, brian - hikarito...@gmail.com wrote:

 only 1 line

   SHeader := 'Authorization: OAuth oauth_callback=oob, realm=,
 oauth_nonce=' + nonce +
  ', oauth_timestamp=' + tstamp + ', oauth_consumer_key=' +
 ConsumerKey +
  ', oauth_signature_method=HMAC-SHA1, oauth_version=1.0,
 oauth_signature=' +
  URLEncode2(sign) +'';


 On Sun, Feb 13, 2011 at 3:35 AM, RTT p...@sapo.pt wrote:

 On 12-02-2011 22:31, brian - wrote:

 Authorization: OAuth oauth_callback=oob, realm=,
 oauth_nonce=5B2407849960FC2B4EC23007EA63E8ED,
 oauth_timestamp=1297549627,
 oauth_consumer_key=5BZYtiAzGvQTL0ZEhAn45w,
 oauth_signature_method=HMAC-SHA1, oauth_version=1.0,
 oauth_signature=RjpaedDdvs6n9yX1TFI%2FNzrnbcQ%3D

 Are you sending these options in only one header line (the Authorization
 one) , or multiple lines as this dump suggest?

 --
 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] Modifying headers before send in httpcli fails

2011-02-12 Thread brian -
Hi,

I've been working on Twitter's OAuth implementation, for which I'm using
THttpCli. There are various ways to do this, one of which is adding some
Auth data in the http headers and not including the parameters int he GET
call. However, there's no option in httpcli to manually modify the headers
before a request, so I did a tiny modification on OverbyteIcsHttpProt as
follows:

587: THttpCli = class(TIcsWndControl)
protected
FExtraSendHeader  : String;

913: published
property ExtraSendHeader : Stringread  FExtraSendHeader
  write
FExtraSendHeader;

2406: if FExtraSendHeader  '' then
begin
  Headers.Add(FExtraSendHeader);
  FExtraSendHeader := '';
end;

I tested this with an event, which seems to be set properly:

procedure TForm1.UpdatesSocketBeforeHeaderSend(Sender: TObject;
  const Method: string; Headers: TStrings);
begin
  memo1.lines.Add(Headers.Text);
end;

so I fire my Get, and the headers all look correct:


URL = http://api.twitter.com/oauth/request_token
GET /oauth/request_token HTTP/1.0
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
User-Agent: Mozilla/4.0 (compatible; ICS)
Host: api.twitter.com
Authorization: OAuth oauth_callback=oob, realm=,
oauth_nonce=5B2407849960FC2B4EC23007EA63E8ED,
oauth_timestamp=1297549627, oauth_consumer_key=5BZYtiAzGvQTL0ZEhAn45w,
oauth_signature_method=HMAC-SHA1, oauth_version=1.0,
oauth_signature=RjpaedDdvs6n9yX1TFI%2FNzrnbcQ%3D

However, this always fails with Failed to validate oauth signature and
token.

I made sure the data is 100% correct. If I use the parameters in the URL
instead, it works just fine, so they are correct.

Any ideas? anywhere else in the code where the added headers might not be
going through?

For reference: http://oauth.net/core/1.0/#auth_header
--
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] Modifying headers before send in httpcli fails

2011-02-12 Thread brian -
Oh yeah, dunno why I thought that was read only  same effect anyway, the
output headers are the same and still OAuth fails. Maybe something to do
with the way httpcli sends the headers?

On Sat, Feb 12, 2011 at 11:42 PM, RTT p...@sapo.pt wrote:

 On 12-02-2011 22:31, brian - wrote:

 there's no option in httpcli to manually modify the headers
 before a request


 You can do it from the OnBeforeHeaderSend event.
 --
 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] Modifying headers before send in httpcli fails

2011-02-12 Thread brian -
only 1 line

  SHeader := 'Authorization: OAuth oauth_callback=oob, realm=,
oauth_nonce=' + nonce +
 ', oauth_timestamp=' + tstamp + ', oauth_consumer_key=' +
ConsumerKey +
 ', oauth_signature_method=HMAC-SHA1, oauth_version=1.0,
oauth_signature=' +
 URLEncode2(sign) +'';


On Sun, Feb 13, 2011 at 3:35 AM, RTT p...@sapo.pt wrote:

 On 12-02-2011 22:31, brian - wrote:

 Authorization: OAuth oauth_callback=oob, realm=,
 oauth_nonce=5B2407849960FC2B4EC23007EA63E8ED,
 oauth_timestamp=1297549627, oauth_consumer_key=5BZYtiAzGvQTL0ZEhAn45w,
 oauth_signature_method=HMAC-SHA1, oauth_version=1.0,
 oauth_signature=RjpaedDdvs6n9yX1TFI%2FNzrnbcQ%3D

 Are you sending these options in only one header line (the Authorization
 one) , or multiple lines as this dump suggest?

 --
 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] EAccessViolations when Posting Data to a HTTPServer

2009-02-04 Thread brian
Hi, do you know about madExcept? That helps a lot in catching the source of 
exceptions.

--
From: Keith Willis i...@net-soft.com.au
Sent: Wednesday, February 04, 2009 14:37
To: 'ICS support mailing' twsocket@elists.org
Subject: Re: [twsocket] EAccessViolations when Posting Data to a HTTPServer

 I've disabled all Firewalls and anti-virus stuff without any change in the
 apps behaviour. I even tried re-compiling the ICS library and also 
 directly
 linking the relevant Pascal units into my project all without any change 
 to
 the problem. I will now try to catch an exception on my development PC 
 when
 I dynamically allocate memory. This sometimes happens and I may be able to
 trap an exception lower down in the ICS code with the debugger if I 
 directly
 link in the Pascal units. I may also install Windows 2000 Pro on to the 
 EEE
 Box target machine.

 ... After this I'm probably out of ideas. It might be time to try the Indy
 component to see what it does :(

 Keith Willis.



 -Original Message-
 From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] On
 Behalf Of Arno Garrels
 Sent: Monday, 2 February 2009 3:43 AM
 To: ICS support mailing
 Subject: Re: [twsocket] EAccessViolations when Posting Data to a 
 HTTPServer

 Keith Willis wrote:
 Well I tried malloc and free without any joy. I have however been
 able to ascertain that its crashing in the call to Receive.

 More significantly its only crashing on my target machine, (an ASUS
 EEE Box B202 running Windows XP Home). I can't seem to crash it on my
 development PC, (A generic Pentium desktop running Windows 2000 Pro).

 Is there some difference between the Winsock library in Windows XP
 Home and Windows 2000 Pro?

 The sample I posted previously to the list runs without problem on both XP
 Home and Pro. Is there any security software installed, like a personal
 firewall, anti-virus software etc.? If so, first try to disable it, if 
 that
 doesn't help, remove it.


 --
 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
 Internal Virus Database is out of date.
 Checked by AVG - http://www.avg.com
 Version: 8.0.173 / Virus Database: 270.7.6/1715 - Release Date: 10/8/2008
 7:19 PM

 -- 
 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] best way to reset HttpCli

2008-10-18 Thread brian
Hi,

I am using a httpcli created on run-time. I first connect to a website, and 
after DocEnd I call another procedure that changes the event procedures and 
connects to a different website. On the 2nd call I get an Exception HTTP 
component is busy, so I do this before trying the 2nd call

  try
LoginSocket.Abort;
  except
  end;

that, however, generates another exception. Checking the httpcli state before 
the abort, it is Waiting Body

What is the best way to reset the component between both calls and leave it 
in a Ready state? The first call is GetAsync and the 2nd one is PostAsync.
-- 
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] best way to reset HttpCli

2008-10-18 Thread brian
You mean I should post the message and wait for the next call until 
OnRequestDone triggers?

where is FMsg_WM_HTTP_SET_READY defined?

thanks

- Original Message - 
From: Fastream Technologies [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Saturday, October 18, 2008 15:47
Subject: Re: [twsocket] best way to reset HttpCli


I reported this as BUG in 2007. Then nobody seemed to find a real solution
 and I found a workaround:

 I created a descendent in C++ and,

 void __fastcall httpClient::SetReady()
 {
 if(alreadySetReady)
  return;
 alreadySetReady = true;
 PostMessage(FHandle, FMsg_WM_HTTP_SET_READY, 0, 0);
 }
 //---
 alreadysettrue is reset before each get/head/postasync. Then you should
 enter your next call in ONRequestdone. It has complex reasons yet if you
 really want to know, breakpoint the original setready.

 Regards,

 SZ

 On Sat, Oct 18, 2008 at 3:16 PM, brian [EMAIL PROTECTED] wrote:

 Hi,

 I am using a httpcli created on run-time. I first connect to a website, 
 and
 after DocEnd I call another procedure that changes the event procedures 
 and
 connects to a different website. On the 2nd call I get an Exception HTTP
 component is busy, so I do this before trying the 2nd call

  try
LoginSocket.Abort;
  except
  end;

 that, however, generates another exception. Checking the httpcli state
 before the abort, it is Waiting Body

 What is the best way to reset the component between both calls and 
 leave
 it in a Ready state? The first call is GetAsync and the 2nd one is
 PostAsync.
 --
 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] best way to reset HttpCli

2008-10-18 Thread brian
I can't access FMsg_WM_HTTP_SET_READY because it's under Protected

- Original Message - 
From: Paul [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Saturday, October 18, 2008 21:40
Subject: Re: [twsocket] best way to reset HttpCli


I think so,

 If you call Abort, OnRequestdone will be triggered.
 You can set a flag when you call abort, and then you can take action in
 OnRequestdone.
 You problably have to free some streams anyway, which are usually freed in
 OnRequestdone.

 Paul



 - Original Message - 
 From: brian [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Saturday, October 18, 2008 9:15 PM
 Subject: Re: [twsocket] best way to reset HttpCli


 You mean I should post the message and wait for the next call until
 OnRequestDone triggers?

 where is FMsg_WM_HTTP_SET_READY defined?

 thanks

 - Original Message - 
 From: Fastream Technologies [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Saturday, October 18, 2008 15:47
 Subject: Re: [twsocket] best way to reset HttpCli


I reported this as BUG in 2007. Then nobody seemed to find a real 
solution
 and I found a workaround:

 I created a descendent in C++ and,

 void __fastcall httpClient::SetReady()
 {
 if(alreadySetReady)
  return;
 alreadySetReady = true;
 PostMessage(FHandle, FMsg_WM_HTTP_SET_READY, 0, 0);
 }
 //---
 alreadysettrue is reset before each get/head/postasync. Then you should
 enter your next call in ONRequestdone. It has complex reasons yet if you
 really want to know, breakpoint the original setready.

 Regards,

 SZ

 On Sat, Oct 18, 2008 at 3:16 PM, brian [EMAIL PROTECTED] wrote:

 Hi,

 I am using a httpcli created on run-time. I first connect to a website,
 and
 after DocEnd I call another procedure that changes the event procedures
 and
 connects to a different website. On the 2nd call I get an Exception
 HTTP
 component is busy, so I do this before trying the 2nd call

  try
LoginSocket.Abort;
  except
  end;

 that, however, generates another exception. Checking the httpcli state
 before the abort, it is Waiting Body

 What is the best way to reset the component between both calls and
 leave
 it in a Ready state? The first call is GetAsync and the 2nd one is
 PostAsync.
 --
 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 

-- 
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] best way to reset HttpCli

2008-10-18 Thread brian
I've decided to just free/re-create the httpcli at run-time, works the best.

thanks

- Original Message - 
From: Paul [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Saturday, October 18, 2008 21:40
Subject: Re: [twsocket] best way to reset HttpCli


I think so,

 If you call Abort, OnRequestdone will be triggered.
 You can set a flag when you call abort, and then you can take action in
 OnRequestdone.
 You problably have to free some streams anyway, which are usually freed in
 OnRequestdone.

 Paul



 - Original Message - 
 From: brian [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Saturday, October 18, 2008 9:15 PM
 Subject: Re: [twsocket] best way to reset HttpCli


 You mean I should post the message and wait for the next call until
 OnRequestDone triggers?

 where is FMsg_WM_HTTP_SET_READY defined?

 thanks

 - Original Message - 
 From: Fastream Technologies [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Saturday, October 18, 2008 15:47
 Subject: Re: [twsocket] best way to reset HttpCli


I reported this as BUG in 2007. Then nobody seemed to find a real 
solution
 and I found a workaround:

 I created a descendent in C++ and,

 void __fastcall httpClient::SetReady()
 {
 if(alreadySetReady)
  return;
 alreadySetReady = true;
 PostMessage(FHandle, FMsg_WM_HTTP_SET_READY, 0, 0);
 }
 //---
 alreadysettrue is reset before each get/head/postasync. Then you should
 enter your next call in ONRequestdone. It has complex reasons yet if you
 really want to know, breakpoint the original setready.

 Regards,

 SZ

 On Sat, Oct 18, 2008 at 3:16 PM, brian [EMAIL PROTECTED] wrote:

 Hi,

 I am using a httpcli created on run-time. I first connect to a website,
 and
 after DocEnd I call another procedure that changes the event procedures
 and
 connects to a different website. On the 2nd call I get an Exception
 HTTP
 component is busy, so I do this before trying the 2nd call

  try
LoginSocket.Abort;
  except
  end;

 that, however, generates another exception. Checking the httpcli state
 before the abort, it is Waiting Body

 What is the best way to reset the component between both calls and
 leave
 it in a Ready state? The first call is GetAsync and the 2nd one is
 PostAsync.
 --
 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 

-- 
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] UDP Address

2008-10-16 Thread brian
Have you checked PeerAddr?

- Original Message - 
From: Xealot [EMAIL PROTECTED]
To: twsocket@elists.org
Sent: Friday, October 17, 2008 04:47
Subject: [twsocket] UDP Address


 Hello!

 I would like to know if its possible to get the address that a UDP packet
 comes from.

 I am making an application that will send multiple packets to different
 hosts using SendTo and I will be receiving replies from them.

 I have no power to change the protocol, so I need to know if its possible 
 to
 find out the address each packet arrived from.

 Currently, I use bytesread := sock.Receive(@data, SizeOf(data));  to 
 receive
 the data.

 where sock is a TWSocket object.  sock.Addr will not work here.. :(

 Thanks for taking your time,

 - Martin 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 

-- 
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] UDP Address

2008-10-16 Thread brian
Maybe GetPeerAddr?

- Original Message - 
From: Xealot [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Friday, October 17, 2008 05:01
Subject: Re: [twsocket] UDP Address


 Thank you for replying,

 PeerAddr raises a SocketException

 'Error 10057 in function GetPeerName Socket is not connected'

 Im assuming this is because I didnt actually run sock.Connect with the
 address I received

 that packet from?  Im only running sock.connect once to avoid changing
 client port

 On Fri, Oct 17, 2008 at 4:54 AM, brian [EMAIL PROTECTED] wrote:

 Have you checked PeerAddr?

 - Original Message -
 From: Xealot [EMAIL PROTECTED]
 To: twsocket@elists.org
 Sent: Friday, October 17, 2008 04:47
 Subject: [twsocket] UDP Address


  Hello!
 
  I would like to know if its possible to get the address that a UDP 
  packet
  comes from.
 
  I am making an application that will send multiple packets to different
  hosts using SendTo and I will be receiving replies from them.
 
  I have no power to change the protocol, so I need to know if its 
  possible
  to
  find out the address each packet arrived from.
 
  Currently, I use bytesread := sock.Receive(@data, SizeOf(data));  to
  receive
  the data.
 
  where sock is a TWSocket object.  sock.Addr will not work here.. :(
 
  Thanks for taking your time,
 
  - Martin 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

 --
 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] Using TWSocket

2008-08-14 Thread brian
you can use SendStr to send a simple text

- Original Message - 
From: Hein du Plessis [EMAIL PROTECTED]
To: twsocket@elists.org
Sent: Thursday, August 14, 2008 4:59 PM
Subject: [twsocket] Using TWSocket


 Hi All

 I'm trying to write a simple TCP/IP app but I'm not sure how to actually
 send data. The Send Method of ICS v6 requires a data type TWSocketData, 
 yet
 the documentation states it needs a pointer.

 On the ICS page there is mention of a sample app, Client5, that would
 probably solve my problem, but I'm unable to find it in the download 
 package
 of ICS V6.

 This is for Delphi.

 Any help appreciated!

 Thanks,
 Hein
 -- 
 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] Using TWSocket

2008-08-14 Thread brian
Then you can either use .send with a memory pointer or load the entire xml 
into a string

- Original Message - 
From: Hein du Plessis [EMAIL PROTECTED]
To: 'ICS support mailing' twsocket@elists.org
Sent: Thursday, August 14, 2008 5:44 PM
Subject: Re: [twsocket] Using TWSocket


 Thanks Brian

 Unfortunately the application on the server requires a binary length
 indicator first, followed by XML. The XML part is easy with the SendStr
 function.

 Thanks,
 Hein

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
 Behalf Of brian
 Sent: 14 August 2008 17:29
 To: ICS support mailing
 Subject: Re: [twsocket] Using TWSocket

 you can use SendStr to send a simple text

 - Original Message -
 From: Hein du Plessis [EMAIL PROTECTED]
 To: twsocket@elists.org
 Sent: Thursday, August 14, 2008 4:59 PM
 Subject: [twsocket] Using TWSocket


 Hi All

 I'm trying to write a simple TCP/IP app but I'm not sure how to actually
 send data. The Send Method of ICS v6 requires a data type TWSocketData,
 yet
 the documentation states it needs a pointer.

 On the ICS page there is mention of a sample app, Client5, that would
 probably solve my problem, but I'm unable to find it in the download
 package
 of ICS V6.

 This is for Delphi.

 Any help appreciated!

 Thanks,
 Hein
 -- 
 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] Converting memorystream to string?

2008-08-13 Thread brian
procedure LoginSocketDocEnd(Sender: TObject);
var p: PChar;
   s: string;
begin
 p := TMemoryStream(LoginSocket.RcvdStream).Memory;
 s:= Copy(StrPas(p), 1, LoginSocket.RcvdStream.Size);

 LoginSocket.RcvdStream.Destroy;
 LoginSocket.RcvdStream := nil;

or if you need stringlists:

procedure ServiceSocketDocEnd(Sender: TObject);
var tt: TStringList;
begin
 tt:= TStringList.Create;

 ServiceSocket.RcvdStream.WriteBuffer(#0' ', 1);
 ServiceSocket.RcvdStream.Position := 0;
 tt.LoadFromStream(ServiceSocket.RcvdStream);
 ServiceSocket.RcvdStream.Destroy;
 ServiceSocket.RcvdStream := nil;


 - Original Message - 
 From: Gilles [EMAIL PROTECTED]
 To: twsocket@elists.org
 Sent: Wednesday, August 13, 2008 7:31 AM
 Subject: [twsocket] Converting memorystream to string?


 Hello

 The HTTPCLI object uses a memorystream, but I need to turn this into
 a string so that I can pass the web page to a TPerlRegEx object to
 extract some information.

 I'm a newbie, and can't find why Delphi2007 complains about incompatible 
 type:

 =
 function StreamToText(oStream : TMemoryStream ): String;
 var
   oSL : TStringlist;
 begin
   oSL := TStringlist.Create;
   oSL.LoadFromStream(oStream);

   result := oSL.Text;

   oSL.Free;
 end;

 procedure TForm1.Button1Click(Sender: TObject);
 var
   WebPage : String;
 begin
   With HttpCli1 do begin
 URL:= 'www.acme.com';
 RcvdStream := TMemoryStream.Create;
 try
   Get;
 except
   ShowMessage('Oops');
   RcvdStream.Free;
   Exit;
 end;

 RcvdStream.Seek(0,0);
 //Memo1.Lines.LoadFromStream(RcvdStream);

 //E2010 Incompatible types: 'TMemoryStream' and 'TStream'
 WebPage := StreamToText(RcvdStream);
 RcvdStream.Free;
   end;
 =

 Any idea what is wrong?

 Thank you for any tip.

 -- 
 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] Converting memorystream to string?

2008-08-13 Thread brian
np. it's made with ASync calls in mind (in the ondoc event), but you can as 
well just include it in the call proc after it returns with your sync 
method.

- Original Message - 
From: GC [EMAIL PROTECTED]
To: twsocket@elists.org
Sent: Wednesday, August 13, 2008 4:45 PM
Subject: Re: [twsocket] Converting memorystream to string?


 Brian,

 At 10:49 13/08/2008, brian wrote:
procedure LoginSocketDocEnd(Sender: TObject);

 (snip)

 Thanks much for the code.

 -- 
 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] UDP question...

2008-07-21 Thread brian
I think with UDP you get can get packets in different order, not get them at 
all, get them repeated.. but as opposed to TCP you get entire packets, if 
you send 100 bytes at once, you get 100 at once. Someone correct me if I'm 
wrong..



 Hi,

 This is the first time I am writing a UDP server. The other UDP was a
 client. It was fairly straight forward.

 As the server lets say I have 2 clients, A and B, that will be sending me
 unsolicited data of 100 bytes per message.

 If I understand, when TWSocket.OnDataAvailable fires the data source can 
 be
 mixed.

 For example I could get 10 bytes from A, then 19 bytes from B, then 14 
 bytes
 from B and then 56 bytes from A, etc.

 And I might not get the hundred bytes. I might only get 45.

 This lead to keeping separate state machines for each client.

 With TCP I normally read the data to the client buffer and post a message 
 so
 that OnDataAvailable is as short as possible. In this case it appears I 
 need
 to read it to a buffer, determine the client, move the data to the clients
 buffer and post a message.


 Sound about right?

 Ciao,

 Mark

 -- 
 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] Delphi2007,UDP, 2x packets

2007-09-12 Thread brian
Yeah, I've worked a lot with TCP and it was really no problem requesting a 
next packet after each, it was very fast.
UDP offers some other valuable features though.

How do you manage missed/double/wrong ordered packets? I thought of making a 
buffer to store a certain amount of packets.. say... maybe 100, and have a 
thread analyze the buffer and request any missing packets until all are 
complete, then process the data. However requests for missing packets might 
also be lost.. so shrug, what a pita to work with UDP :p 

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


Re: [twsocket] Delphi2007,UDP, 2x packets

2007-09-11 Thread brian
Hi, I checked it out, that's quite confusing heh. I'd appreciate it if you 
could show me a simple code for a UDP wsocket to Listen; and send data back 
to the host it received from.

Thanks! 

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


Re: [twsocket] Delphi2007,UDP, 2x packets

2007-09-11 Thread brian
Thanks, that's really helpful! (only missed the pointer to the buffer in 
that code)

it seems acknowledging every packet with udp before sending more turns out 
much slower than tcp 

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


Re: [twsocket] Delphi2007,UDP, 2x packets

2007-09-09 Thread brian
This is the simple test code to receive the data

procedure TForm1.WSocket1DataAvailable(Sender: TObject; ErrCode: Word);
begin
   Inc(rec,1);
   caption:= 'Received packets = '+inttostr(rec);
   memo1.lines.add(WSocket2.ReceiveStr);
end;



 Are you calling the message pump from one of your event handler ? You 
 shouldn't !
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Delphi2007,UDP, 2x packets

2007-09-09 Thread brian
sorry, actually it's this

procedure TForm1.WSocket2DataAvailable(Sender: TObject; ErrCode: Word);
Var a: string;
begin
 a:= WSocket2.ReceiveStr;
 // if length(a) = 0 then Exit; 
 Inc(rec,1);
 caption:= 'Received packets = '+inttostr(rec);
 memo1.lines.add('Data: '+a);
end;

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


Re: [twsocket] HttpCli.Get problem

2007-09-09 Thread brian
Use the DocEnd event
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] Sever architecture

2006-08-17 Thread Brian Sheeres
This is less of a socket question and more of an implementation question.

Imagine a server with many concurrent connections but that only allows one
connection at a time to submit a request, access/manipulate data and then
send the results back to all other connections. In other words all requests
(regardless of which connection it's coming from) must be serialized.

Is the proper architecture to have one thread contain all the connections
and then, when an socket event fires, assign the request to a worker thread
(from a pool) which in turn attempts to access a critical section of another
thread (the data manipulation thread)?

Thanks for the input.

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


Re: [twsocket] Twsocketserver

2005-08-15 Thread brian
An example on how I do it:


procedure TUser.SocketDataAvailable(Sender: TObject; Error: Word);
Var a: Integer;
abc,d: string;
begin
 if ToRcv = 0 then  // NEW PACKET INCLUDING HEADER
  begin
   NBuffer:= NBuffer + NSocket.ReceiveStr;
   AnalyzePacket;
  end
 else
  begin
   if NSocket.RcvdCount  ToRcv then Exit; // THERES MORE DATA TO RECEIVE TO 
COMPLETE PACKET
   NBuffer:= NBuffer + NSocket.ReceiveStr;
   abc:= funcs.Decr(Copy(NBuffer,1,PacketLnght),EncodePswd,True);  // 
dismiss, just decription of data
   Delete(NBuffer,1,PacketLnght);  // KEEP NEW PACKET DATA ON THE BUFFER IF 
ANY
   NewCommand(abc);  // PROCESS A FULL RECEIVED PACKET
   ToRcv:= 0;
   AnalyzePacket; // CHECK IF REAMINING DATA ON THE BUFFER CONTAINS HEADER 
FOR NEXT PACKET
  end;
end;

Procedure TUser.AnalyzePacket;
Var a: Integer;
abc: String;
Label 1;
begin
1:
 if NBuffer = '' then Exit;
 a:= Pos(#0,NBuffer); // #0 = END OF PACKET HEADER
 if (a  1) or (a = length(NBuffer)) then Exit; // NO DATA AFTER THE HEADER

 PacketLnght:= StrToInt(copy(NBuffer,1,a-1)); // PACKET LENGHT IN STRING 
FORM (/blush, old code :p)
 Delete(NBuffer,1,a); // DELETE HEADER

 ToRcv:= PacketLnght - length(NBuffer); // SIZE OF REAMAINING DATA TO 
COMPLETE PACKET
 if ToRcv  1 then // IF PACKET IS FULL PROCEED TO DECODE DATA AND PROCESS A 
NEW COMMAND
  begin
   abc:= funcs.Decr(Copy(NBuffer,1,PacketLnght),EncodePswd,True);
   Delete(NBuffer,1,PacketLnght);
   NewCommand(abc);
  end;

 if ToRcv  0 then goto 1;
end;

procedure TUser.SendCommand(Cmd: byte; params: string);
var  q,r: string;
begin
q:= Funcs.Encr(chr(Cmd)+Params,EncodePswd,True);
r:= IntToStr(length(q))+#0;
NSocket.SendStr(r+q);
end;


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


Re: [twsocket] Twsocketserver

2005-08-14 Thread brian
You could use a custom small header on every packet you send, i.e. first 2-4 
bytes being the packet size, so when you receive data you add to a buffer 
and check if it reached the total size of the packet. If it has not, do 
nothing, if it has, complete the buffer and send the data packet to a 
processing routine. If the last data amount received exceeds the packet 
lenght you specified in the header, you can cut it and move it into a new 
clean buffer. I have some sources for that if you need

- Original Message - 
From: Igor Pokorny [EMAIL PROTECTED]
To: twsocket@elists.org
Sent: Monday, August 15, 2005 00:50
Subject: [twsocket] Twsocketserver


 Hi guys,

 I do have a realtime application communicates to one side by USB and to
 the other acts as http server and/or TCPserver. I am trying to use ICS
 http server and everything seems OK. I use another free component of TCP
 server that has to run in different thread because of not event driven.
  Synchronizing makes me a lot of problems so I decided to use TCP
 server from ICS. My TCP communication isn't line oriented. Could I find
 any documentation to Twsocketserver or some example how to handle binary
 and maybe fragmented packets?  I am already late with my project so I
 would prefer quick, maybe dirty help :-(

 Thanks in advance

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

 

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


Re: [twsocket] FTP as system service: Cannot convert port 'ftp-data'

2005-08-12 Thread brian
I checked the file, it seems to be ok, and there's no viruses in my system 
either. Running admin account
Where else can I check for what's wrong ?

Thanks.

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This file contains port numbers for well-known services defined by IANA
#
# Format:
#
# service name  port number/protocol  [aliases...]   [#comment]
#

echo7/tcp
echo7/udp
discard 9/tcpsink null
discard 9/udpsink null
systat 11/tcpusers  #Active users
systat 11/tcpusers  #Active users
daytime13/tcp
daytime13/udp
qotd   17/tcpquote  #Quote of the day
qotd   17/udpquote  #Quote of the day
chargen19/tcpttytst source  #Character generator
chargen19/udpttytst source  #Character generator
ftp-data   20/tcp   #FTP, data
ftp21/tcp   #FTP. control


- Original Message - 
From: Francois Piette [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Friday, August 12, 2005 08:40
Subject: Re: [twsocket] FTP as system service: Cannot convert port 
'ftp-data'


 I'm trying to port the ftp server demo to a system service,
 however when I connect I get this error in the ftp client:

 451: Failed: connect: WSocketResolvePort: Cannot
 convert port 'ftp-data'. Error #11004
 Unable to complete transfer
 Any idea why it gets that error when running as a system service ?

 This error is from winsock when the component try to get the port number 
 corresponding to the port
 name ftp-data. You either have your 
 WindowsDir\System32\Drivers\Etc\Services file missing or
 corrupted, or the account on which your service run has no permission to 
 that system file and
 winsock can't resolve protocol names to protocol port numbers. If this 
 error also occur with normal
 applications, then you ahve probably been hacked by a virus. Some of them 
 mess the tcp/ip settings
 up.

 A quick hack would be to replace all occurences of 'ftp-data' by '20' in 
 the component source code.
 Of course it is better to fix your system configuration.

 --
 [EMAIL PROTECTED]
 http://www.overbyte.be

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

 

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


Re: [twsocket] FTP as system service: Cannot convert port 'ftp-data'

2005-08-12 Thread brian
You are right. I tried to run the ftp server demo as a normal app and it 
failed to resolve ftp port. Something happened in the last few days since 
it was working earlier. I am quite sure I haven't been infected by a virus 
though, I keep a good security profile on my system. I don't have norton, 
don't like it either. As for an antivirus I use Kaspersky.

How could I debug this problem to find where the error lies in the system ? 
Maybe some registry setting ?

Thanks

- Original Message - 
From: Francois PIETTE [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Friday, August 12, 2005 18:22
Subject: Re: [twsocket] FTP as system service: Cannot convert port 
'ftp-data'


 Sometimes the files is OK but not at the right place. The virus change the
 location of the file specified in the registry, so the system doesn't find
 it.
 But to be sure, just run the program (or ICS demo) as a normal program and
 see if you have the error also.
 If you have Norton Security, disable it, at least for testing. IMO it's a
 bad product.
 Disable any firewall or security system you may have (disconnect from the
 internet to be safe).
 --
 [EMAIL PROTECTED]
 http://www.overbyte.be

 - Original Message - 
 From: brian [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Friday, August 12, 2005 5:42 PM
 Subject: Re: [twsocket] FTP as system service: Cannot convert port
 'ftp-data'


I checked the file, it seems to be ok, and there's no viruses in my system
 either. Running admin account
 Where else can I check for what's wrong ?

 Thanks.

 # Copyright (c) 1993-1999 Microsoft Corp.
 #
 # This file contains port numbers for well-known services defined by IANA
 #
 # Format:
 #
 # service name  port number/protocol  [aliases...]   [#comment]
 #

 echo7/tcp
 echo7/udp
 discard 9/tcpsink null
 discard 9/udpsink null
 systat 11/tcpusers  #Active users
 systat 11/tcpusers  #Active users
 daytime13/tcp
 daytime13/udp
 qotd   17/tcpquote  #Quote of the day
 qotd   17/udpquote  #Quote of the day
 chargen19/tcpttytst source  #Character generator
 chargen19/udpttytst source  #Character generator
 ftp-data   20/tcp   #FTP, data
 ftp21/tcp   #FTP. control


 - Original Message - 
 From: Francois Piette [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Friday, August 12, 2005 08:40
 Subject: Re: [twsocket] FTP as system service: Cannot convert port
 'ftp-data'


 I'm trying to port the ftp server demo to a system service,
 however when I connect I get this error in the ftp client:

 451: Failed: connect: WSocketResolvePort: Cannot
 convert port 'ftp-data'. Error #11004
 Unable to complete transfer
 Any idea why it gets that error when running as a system service ?

 This error is from winsock when the component try to get the port number
 corresponding to the port
 name ftp-data. You either have your
 WindowsDir\System32\Drivers\Etc\Services file missing or
 corrupted, or the account on which your service run has no permission to
 that system file and
 winsock can't resolve protocol names to protocol port numbers. If this
 error also occur with normal
 applications, then you ahve probably been hacked by a virus. Some of 
 them
 mess the tcp/ip settings
 up.

 A quick hack would be to replace all occurences of 'ftp-data' by '20' in
 the component source code.
 Of course it is better to fix your system configuration.

 --
 [EMAIL PROTECTED]
 http://www.overbyte.be

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



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

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

 

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


[twsocket] FTP as system service: Cannot convert port 'ftp-data'

2005-08-11 Thread brian
I'm trying to port the ftp server demo to a system service, however when I 
connect I get this error in the ftp client:

451: Failed: connect: WSocketResolvePort: Cannot convert port 'ftp-data'. Error 
#11004
Unable to complete transfer



Any idea why it gets that error when running as a system service ?
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be