Re: [twsocket] Using WSocket in thread...

2008-08-30 Thread Ja
How do I work in blocking mode?


Dnia 29 sierpnia 2008 23:52 Paul [EMAIL PROTECTED] napisał(a):

 Your thread needs a message pump, unless you work in blocking mode.
 
 Paul
 
 
 
 - Original Message - 
 From: Ja 
 To: 
 Sent: Friday, August 29, 2008 11:27 PM
 Subject: [twsocket] Using WSocket in thread...
 
 
  Hello,
  I'm trying to convert demo of SSL socket to make it in thread but there 
  seems to be something wrong... I think that On* events are not being run 
  at all...
 
  http://phpfi.com/348552
 
  Full source:
  http://zycie.org/SSLTHREADED.rar
 
  Could anybody help me with that?
  Best regards,
  FlashT
  -- 
  To unsubscribe or change your 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 WSocket in thread...

2008-08-30 Thread Arno Garrels
Ja wrote:
 How do I work in blocking mode?

ICS works non-blocking: 
http://wiki.overbyte.be/wiki/index.php/Asynchronous_Paradigm
Even though some upper level components support blocking mode as well 
it's suggested to work asynchronous.

--
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html

-- 
To unsubscribe or change your 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 WSocket in thread...

2008-08-30 Thread Ja
Ok then, I really need it to be in thread, so what do I do to make my code work?


Dnia 30 sierpnia 2008 9:18 Arno Garrels [EMAIL PROTECTED] napisał(a):

 Ja wrote:
  How do I work in blocking mode?
 
 ICS works non-blocking: 
 http://wiki.overbyte.be/wiki/index.php/Asynchronous_Paradigm
 Even though some upper level components support blocking mode as well 
 it's suggested to work asynchronous.
 
 --
 Arno Garrels [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 
 -- 
 To unsubscribe or change your 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 WSocket in thread...

2008-08-30 Thread Arno Garrels
Ja wrote:
 Ok then, I really need it to be in thread, so what do I do to make my
 code work?

At first read this: 
 http://wiki.overbyte.be/wiki/index.php/FAQ.MultiThreading

If you still believe you have to run TWSocket in a thread you
need a message loop (as Paul pointed out).

Something like:

procedure TMyThread.Execute;
begin
   WSocket1  := TWSocket.Create(nil);
   try
Assign event handlers and properties..
 WSocket1.Connect;
// Start the message loop, post WM_QUIT message latert to break the 
loop. 
 WSocket1.MessageLoop;
  finally
 WSocket1.Free;  
 end;
end; 

OpenSSL in a multi-threaded application you also requires use of
one of the components from OverbyteIcsSslThrdLock.pas, otherwise
OpenSSL libraries won't be thread-safe, read the comment section of
that unit. 

--
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html



 
 
 Dnia 30 sierpnia 2008 9:18 Arno Garrels [EMAIL PROTECTED]
 napisał(a): 
 
 Ja wrote:
 How do I work in blocking mode?
 
 ICS works non-blocking:
 http://wiki.overbyte.be/wiki/index.php/Asynchronous_Paradigm Even
 though some upper level components support blocking mode as well 
 it's suggested to work asynchronous.
 
 --
 Arno Garrels [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 
 --
 To unsubscribe or change your 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 WSocket in thread...

2008-08-30 Thread Ja
Thank you.
WSocket1.MessageLoop; works great.
Best regards,
FlashT


Dnia 30 sierpnia 2008 9:49 Arno Garrels [EMAIL PROTECTED] napisał(a):

 Ja wrote:
  Ok then, I really need it to be in thread, so what do I do to make my
  code work?
 
 At first read this: 
  http://wiki.overbyte.be/wiki/index.php/FAQ.MultiThreading
 
 If you still believe you have to run TWSocket in a thread you
 need a message loop (as Paul pointed out).
 
 Something like:
 
 procedure TMyThread.Execute;
 begin
WSocket1  := TWSocket.Create(nil);
try
 Assign event handlers and properties..
  WSocket1.Connect;
 // Start the message loop, post WM_QUIT message latert to break 
 the loop. 
  WSocket1.MessageLoop;
   finally
  WSocket1.Free;  
  end;
 end; 
 
 OpenSSL in a multi-threaded application you also requires use of
 one of the components from OverbyteIcsSslThrdLock.pas, otherwise
 OpenSSL libraries won't be thread-safe, read the comment section of
 that unit. 
 
 --
 Arno Garrels [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 
 
 
  
  
  Dnia 30 sierpnia 2008 9:18 Arno Garrels 
  napisał(a): 
  
  Ja wrote:
  How do I work in blocking mode?
  
  ICS works non-blocking:
  http://wiki.overbyte.be/wiki/index.php/Asynchronous_Paradigm Even
  though some upper level components support blocking mode as well 
  it's suggested to work asynchronous.
  
  --
  Arno Garrels [TeamICS]
  http://www.overbyte.be/eng/overbyte/teamics.html
  
  --
  To unsubscribe or change your 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 WSocket in thread...

2008-08-29 Thread Paul
Your thread needs a message pump, unless you work in blocking mode.

Paul



- Original Message - 
From: Ja [EMAIL PROTECTED]
To: twsocket@elists.org
Sent: Friday, August 29, 2008 11:27 PM
Subject: [twsocket] Using WSocket in thread...


 Hello,
 I'm trying to convert demo of SSL socket to make it in thread but there 
 seems to be something wrong... I think that On* events are not being run 
 at all...

 http://phpfi.com/348552

 Full source:
 http://zycie.org/SSLTHREADED.rar

 Could anybody help me with that?
 Best regards,
 FlashT
 -- 
 To unsubscribe or change your 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