Re: [twsocket] WSocket - HOW DO I...?

2006-06-23 Thread Wilfried Mestdagh
Hello Waldemar,

 In BF2 it uses TCP... anyways... the problem is that i dunno how to
 set this buffer size

This has nothing to do with a buffer size. It is how TCP works. See
TCP/UDP primer on overbyte home page.

For the problem you have it is very simple. Check the protocol that the
server use. It can be line oriented, for example a terminating character
(or more) at the end of each data, or a header with the size in it.

If it is the former then you can use LineMode, if it is the latter you
have to concatenate packets until you have them all.
   
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
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] V6 ThreadDetach #2

2006-06-23 Thread Francois Piette
For debugging purpose, do this:

Create a global public variable in wndcontrol, initialize it to false.
From your thread exceute, just after threaddetach, set it to true.
From the routine where the window handle is allocated (I haven't the code
here, I do from my head), add this:
if MyGlobalVar then
OutputDebugString('Got it');
Then place a breakpoint on the OutputDebugString line and run your program.
When (if) the breakpoint is hit, have a look at the stack trace to
understand where it comes from.

Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be


- Original Message - 
From: Arno Garrels [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Thursday, June 22, 2006 9:37 PM
Subject: Re: [twsocket] V6 ThreadDetach #2


 Arno Garrels wrote:
  Francois PIETTE wrote:
  Not sure what you mean. The problem is that even if you call
  ThreadDetach (which is to make the component windowless) you cannot
  be sure that the component will not allocate another window handle
  somewhere in the background
  after that call to ThreadDetach.
 
  I don't see how the component would create another window handle once
  ThreadDetach has been called: no event will be generated anymore.
  Only the currently executing event will continue execution ans far as
  memory serve me well, no event recreate a window handle.

 Typo, sorry!

 Correction:

 If so, why do I get this exception? ThreadDetach is executed and
 property Handle is set to zero. Nevertheless the exeption is raised.
 So a window handle must have been allocated after the call to ThreadDetach
 somewhere. Please tell me what might be wrong with the very simple
 code I posted before. There's no deadlock, sure. Especially not if
 you exchange WaitFor by WaitForSingleObject. Also, as far as I can
 see entire methode ThreadDetach is blocking, so the thread shouldn't
 signal before the window handle was set to zero, right?
 -- 
 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] WSocket - HOW DO I...?

2006-06-23 Thread Francois Piette
If you have a protocol designed for UDP and use it with UDP, then you have a
problem: UDP preserve datagram boundaries. TCP doesn't because it is a
stream oriented protocol. So when in the UDP version you simply send bf2cc
pl (exactly, without anything prepened or appended), then with TCP you
_must_ add an end of line delimiter such as a CR/LF pair so that the
receiver know when data has been received.

Again, read TCP/UDP primer document available from the support page at my
website.

Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be



- Original Message - 
From: Waldemar Łukaszewski [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Thursday, June 22, 2006 10:00 PM
Subject: Re: [twsocket] WSocket - HOW DO I...?


 In BF2 it uses TCP... anyways... the problem is that i dunno how to set
this buffer size :( The problem appears only on WIFI connection... :(


 Dnia 22-06-2006 o godz. 21:23 Dan napisał(a):
  RCON usually uses UDP (at least in my experience with Half-Life).  You
  probably need to increase the buffer size of the socket so that all the
  data
  is included in a single datagram.
 
  Dan
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On
  Behalf Of Waldemar Lukaszewski
  Sent: 22 June 2006 19:34
  To: ICS support mailing
  Subject: Re: [twsocket] WSocket - HOW DO I...?
 
  The problem is that i'm only making a clinet. Server is as it is. There
  is
  no way to change it...
 
 
  Dnia 22-06-2006 o godz. 17:58 Francois PIETTE napisał(a):
have no idea how do i know if server have sent all it wanted to send
   after
command.
  
   The easiest is to add a delimiter after the data. And the eaisiest is
  to
   use
   a CR/LF pair, that is send text lines. It is easy because TWSocket has
  a
   LineMode you can set to TRUE to have it assemble complete lines before
   triggering OnDataAvailable.
  
   You should probably read the document TCP/UDP primer available from
   the
   support page at my website.
  
  
   --
   Contribute to the SSL Effort. Visit
http://www.overbyte.be/eng/ssl.html
   --
   [EMAIL PROTECTED]
   http://www.overbyte.be
  
  
  
   - Original Message - 
   From: Waldemar Łukaszewski [EMAIL PROTECTED]
   To: twsocket twsocket@elists.org
   Sent: Thursday, June 22, 2006 5:48 PM
   Subject: [twsocket] WSocket - HOW DO I...?
  
  
Hi.
Got serious problem with WSocket... im trying to write a client for
   rcon
(BF2 game server administration system), but have no idea how do i
   know if
server have sent all it wanted to send after command.
   
For example got command bf2cc pl that list players on the server
  and
gives some information about them... its raw text... but on my
  laptop
   it
sends data 2 times: first parto of data and second part of data...
  and
   how
do i know if its all or will it send some more??
   
Thanx for help!
WL
   

Chciałbyś zagrać w POKERA ON-LINE ale nie chcesz nic płacić?
Zagraj z nami! Darmowy polski poker on-line na Wirtualnej Polsce:
   
  
 
http://klik.wp.pl/?adr=www.gol.wp.pl%2Fgry.online-poker.draw.htmlsid=799
   
   
-- 
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
  
 
  
  Chciałbyś zagrać w POKERA ON-LINE ale nie chcesz nic płacić?
  Zagraj z nami! Darmowy polski poker on-line na Wirtualnej Polsce:
 
http://klik.wp.pl/?adr=www.gol.wp.pl%2Fgry.online-poker.draw.htmlsid=799
 
 
  -- 
  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
 

 
 Potrzebujesz gotówki? Halogotówka to nawet 5 bez wizyty w banku.
 Rata od 35 zł, bez poręczycieli. Wniosek i decyzja przez telefon.
 Wypełnij formularz. Oddzwonimy. Kliknij po szczegóły!

http://klik.wp.pl/?adr=http%3A%2F%2Fadv.reklama.wp.pl%2Fas%2Fh1906.htmlsid=791


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

Re: [twsocket] V6 ThreadDetach #2

2006-06-23 Thread Arno Garrels
Already got it! It is as I wrote in my previous mail...

procedure TWSocketClient.TriggerSessionClosed(ErrCode : Word);
begin
if not FSessionClosedFlag then begin
FSessionClosedFlag := TRUE;
if Assigned(FServer) then
PostMessage(Server.Handle, Server.FMsg_WM_CLIENT_CLOSED, ErrCode,
{$IFDEF CLR}
Integer(IntPtr(Self.HandleGc)));
{$ENDIF}
{$IFDEF WIN32}
LongInt(Self));
{$ENDIF}
inherited TriggerSessionClosed(ErrCode);
end;
end;

A getter that automatically allocates a new window handle is a bad solution!
 


Francois Piette wrote:
 For debugging purpose, do this:
 
 Create a global public variable in wndcontrol, initialize it to false.
 From your thread exceute, just after threaddetach, set it to true.
 From the routine where the window handle is allocated (I haven't the
 code 
 here, I do from my head), add this:
 if MyGlobalVar then
 OutputDebugString('Got it');
 Then place a breakpoint on the OutputDebugString line and run your
 program. When (if) the breakpoint is hit, have a look at the stack
 trace to understand where it comes from.
 
 Contribute to the SSL Effort. Visit
 http://www.overbyte.be/eng/ssl.html --
 [EMAIL PROTECTED]
 Author of ICS (Internet Component Suite, freeware)
 Author of MidWare (Multi-tier framework, freeware)
 http://www.overbyte.be
 
 
 - Original Message -
 From: Arno Garrels [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Thursday, June 22, 2006 9:37 PM
 Subject: Re: [twsocket] V6 ThreadDetach #2
 
 
 Arno Garrels wrote:
 Francois PIETTE wrote:
 Not sure what you mean. The problem is that even if you call
 ThreadDetach (which is to make the component windowless) you
 cannot be sure that the component will not allocate another
 window handle somewhere in the background
 after that call to ThreadDetach.
 
 I don't see how the component would create another window handle
 once ThreadDetach has been called: no event will be generated
 anymore. Only the currently executing event will continue
 execution ans far as memory serve me well, no event recreate a
 window handle. 
 
 Typo, sorry!
 
 Correction:
 
 If so, why do I get this exception? ThreadDetach is executed and
 property Handle is set to zero. Nevertheless the exeption is raised.
 So a window handle must have been allocated after the call to
 ThreadDetach somewhere. Please tell me what might be wrong with the
 very simple code I posted before. There's no deadlock, sure.
 Especially not if you exchange WaitFor by WaitForSingleObject. Also,
 as far as I can see entire methode ThreadDetach is blocking, so the
 thread shouldn't signal before the window handle was set to zero,
 right? --
 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] smtpclient error

2006-06-23 Thread Marcelo Grossi
Probably nothing. See the header on the SmtpClient for the changes made in 
the versions. An explanation about the removal of ShareMode should be there. 
The ICS guys are very 'clean' :)

Cheers,

Marcelo Grossi

- Original Message - 
From: kaythorn [EMAIL PROTECTED]
To: twsocket@elists.org
Sent: Thursday, June 22, 2006 7:16 PM
Subject: [twsocket] smtpclient error


I have been using the smtp component for some time, but need to update it 
because I need the authentication feature so I downloaded the current ics 
suite.

 On recompiling my program I get an error message reading 
 SmptClient.ShareMode Property does not exist

 What have I done wrong?

 Roland Couvela
 -- 
 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] SMTP and NTLM authentication

2006-06-23 Thread Gies,Brad


Does the SmtpCli and SyncSmtpCli support NTLM authentication, and if so,
what setting needs to be enabled to use it?



Sincerely,

Brad Gies
-
NLM Software
Southfield, MI, USA
- 

Do everything in moderation including abstinence




This e-mail is intended only for the person or entity to which it is addressed 
and may
contain confidential and/or privileged material.  Any review, retransmission,
dissemination or other use of, or taking of any action in reliance upon, this 
information
by persons or entities other than the intended recipient is prohibited.  If you
received this message in error, please contact the sender immediately and delete
the material from your computer.
-- 
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] SMTP and NTLM authentication

2006-06-23 Thread Arno Garrels
Gies,Brad wrote:
 Does the SmtpCli and SyncSmtpCli support NTLM authentication, and if
 so, what setting needs to be enabled to use it?

It's not yet implemented. The THttpCli already uses NTLM authentication,
so it should not be very difficult to make the TSmtpCli NTLM-capable as
well.

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

 
 
 
 Sincerely,
 
 Brad Gies
 -
 NLM Software
 Southfield, MI, USA
 -
 
 Do everything in moderation including abstinence
 
 
 
 
 This e-mail is intended only for the person or entity to which it is
 addressed and may contain confidential and/or privileged material. 
 Any review, retransmission, dissemination or other use of, or taking
 of any action in reliance upon, this information by persons or
 entities other than the intended recipient is prohibited.  If you
 received this message in error, please contact the sender immediately
 and delete the material from your computer. 
-- 
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] V6 ThreadDetach #2

2006-06-23 Thread Arno Garrels
Francois PIETTE wrote:
 You get the session closed after calling ThreadDetach ?

Yes, since I'm always stress testing. A client may disconnect at
any time. It would be more straight ahead if the getter would become 
a real getter (returning zero if there's no window available) then
checking the return value of PostMessage and raising an exception if
necessary, in this case it propably would be something like 
Invalid handle that would make much more sense finding the bug,
what do you think?


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


 --
 [EMAIL PROTECTED]
 http://www.overbyte.be
 
 - Original Message -
 From: Arno Garrels [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Friday, June 23, 2006 8:55 AM
 Subject: Re: [twsocket] V6 ThreadDetach #2
 
 
 Already got it! It is as I wrote in my previous mail...
 
 procedure TWSocketClient.TriggerSessionClosed(ErrCode : Word);
 begin
if not FSessionClosedFlag then begin
FSessionClosedFlag := TRUE;
if Assigned(FServer) then
PostMessage(Server.Handle, Server.FMsg_WM_CLIENT_CLOSED,
 ErrCode,
{$IFDEF CLR}
Integer(IntPtr(Self.HandleGc)));
{$ENDIF}
{$IFDEF WIN32}
LongInt(Self));
{$ENDIF}
inherited TriggerSessionClosed(ErrCode);
end;
 end;
 
 A getter that automatically allocates a new window handle is a bad
 solution!
 
 
 
 Francois Piette wrote:
 For debugging purpose, do this:
 
 Create a global public variable in wndcontrol, initialize it to
 false. 
 From your thread exceute, just after threaddetach, set it to true.
 From the routine where the window handle is allocated (I haven't
 the code
 here, I do from my head), add this:
 if MyGlobalVar then
 OutputDebugString('Got it');
 Then place a breakpoint on the OutputDebugString line and run your
 program. When (if) the breakpoint is hit, have a look at the stack
 trace to understand where it comes from.
 
 Contribute to the SSL Effort. Visit
 http://www.overbyte.be/eng/ssl.html --
 [EMAIL PROTECTED]
 Author of ICS (Internet Component Suite, freeware)
 Author of MidWare (Multi-tier framework, freeware)
 http://www.overbyte.be
 
 
 - Original Message -
 From: Arno Garrels [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Thursday, June 22, 2006 9:37 PM
 Subject: Re: [twsocket] V6 ThreadDetach #2
 
 
 Arno Garrels wrote:
 Francois PIETTE wrote:
 Not sure what you mean. The problem is that even if you call
 ThreadDetach (which is to make the component windowless) you
 cannot be sure that the component will not allocate another
 window handle somewhere in the background
 after that call to ThreadDetach.
 
 I don't see how the component would create another window handle
 once ThreadDetach has been called: no event will be generated
 anymore. Only the currently executing event will continue
 execution ans far as memory serve me well, no event recreate a
 window handle.
 
 Typo, sorry!
 
 Correction:
 
 If so, why do I get this exception? ThreadDetach is executed and
 property Handle is set to zero. Nevertheless the exeption is
 raised. So a window handle must have been allocated after the call
 to ThreadDetach somewhere. Please tell me what might be wrong with
 the very simple code I posted before. There's no deadlock, sure.
 Especially not if you exchange WaitFor by WaitForSingleObject.
 Also, as far as I can see entire methode ThreadDetach is blocking,
 so the thread shouldn't signal before the window handle was set to
 zero, right? --
 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


Re: [twsocket] V6 ThreadDetach #2

2006-06-23 Thread Francois PIETTE
 what do you think?

The getter could be changed but this could break something elsewhere 
depending on the handle being created when needed. Since checking the handle 
value is useful to know if attached or not to a thread, maybe a simple new 
method IsThreadAttached could be created, just returning Result := FHandle 
 0;
Then the offending code could be changed to:
   if Assigned(FServer) and FServer.IsThreadAttached then
   PostMessage(Server.Handle, Server.FMsg_WM_CLIENT_CLOSED,

btw: IsThreadAttached is probably the best name. It's just was is passing 
thru my head now.

--
Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
http://www.overbyte.be



- Original Message - 
From: Arno Garrels [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Friday, June 23, 2006 9:12 PM
Subject: Re: [twsocket] V6 ThreadDetach #2


 Francois PIETTE wrote:
 You get the session closed after calling ThreadDetach ?

 Yes, since I'm always stress testing. A client may disconnect at
 any time. It would be more straight ahead if the getter would become
 a real getter (returning zero if there's no window available) then
 checking the return value of PostMessage and raising an exception if
 necessary, in this case it propably would be something like
 Invalid handle that would make much more sense finding the bug,
 what do you think?


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



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

 - Original Message -
 From: Arno Garrels [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Friday, June 23, 2006 8:55 AM
 Subject: Re: [twsocket] V6 ThreadDetach #2


 Already got it! It is as I wrote in my previous mail...

 procedure TWSocketClient.TriggerSessionClosed(ErrCode : Word);
 begin
if not FSessionClosedFlag then begin
FSessionClosedFlag := TRUE;
if Assigned(FServer) then
PostMessage(Server.Handle, Server.FMsg_WM_CLIENT_CLOSED,
 ErrCode,
{$IFDEF CLR}
Integer(IntPtr(Self.HandleGc)));
{$ENDIF}
{$IFDEF WIN32}
LongInt(Self));
{$ENDIF}
inherited TriggerSessionClosed(ErrCode);
end;
 end;

 A getter that automatically allocates a new window handle is a bad
 solution!



 Francois Piette wrote:
 For debugging purpose, do this:

 Create a global public variable in wndcontrol, initialize it to
 false.
 From your thread exceute, just after threaddetach, set it to true.
 From the routine where the window handle is allocated (I haven't
 the code
 here, I do from my head), add this:
 if MyGlobalVar then
 OutputDebugString('Got it');
 Then place a breakpoint on the OutputDebugString line and run your
 program. When (if) the breakpoint is hit, have a look at the stack
 trace to understand where it comes from.

 Contribute to the SSL Effort. Visit
 http://www.overbyte.be/eng/ssl.html --
 [EMAIL PROTECTED]
 Author of ICS (Internet Component Suite, freeware)
 Author of MidWare (Multi-tier framework, freeware)
 http://www.overbyte.be


 - Original Message -
 From: Arno Garrels [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Thursday, June 22, 2006 9:37 PM
 Subject: Re: [twsocket] V6 ThreadDetach #2


 Arno Garrels wrote:
 Francois PIETTE wrote:
 Not sure what you mean. The problem is that even if you call
 ThreadDetach (which is to make the component windowless) you
 cannot be sure that the component will not allocate another
 window handle somewhere in the background
 after that call to ThreadDetach.

 I don't see how the component would create another window handle
 once ThreadDetach has been called: no event will be generated
 anymore. Only the currently executing event will continue
 execution ans far as memory serve me well, no event recreate a
 window handle.

 Typo, sorry!

 Correction:

 If so, why do I get this exception? ThreadDetach is executed and
 property Handle is set to zero. Nevertheless the exeption is
 raised. So a window handle must have been allocated after the call
 to ThreadDetach somewhere. Please tell me what might be wrong with
 the very simple code I posted before. There's no deadlock, sure.
 Especially not if you exchange WaitFor by WaitForSingleObject.
 Also, as far as I can see entire methode ThreadDetach is blocking,
 so the thread shouldn't signal before the window handle was set to
 zero, right? --
 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