- Original Message -
From: [EMAIL PROTECTED]
To: twsocket@elists.org
Sent: Sunday, May 20, 2007 2:00 PM
Subject: TWSocket Digest, Vol 220, Issue 10
Hello,
Thanks very much for the reply and help.
So i understand...
Assumed the sever is listening...
In tcp proto.
1) connect the client
2) in Client.SessionConnected event : send the string
3) In Client.Datasent event : client.closedelayed
But then for a response
Is this correct ?
1) In server.DataAvailable event : server : ClientServer.sendstring
response;
2) In Server : ClientServer.Datasent event :
server.clientserver.closedelayed
balbaro
Send TWSocket mailing list submissions to
twsocket@elists.org
To subscribe or unsubscribe via the World Wide Web, visit
http://www.elists.org/mailman/listinfo/twsocket
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than Re: Contents of TWSocket digest...
Today's Topics:
1. Newbie problems with TWSocket. (balbaro)
2. Re: Newbie problems with TWSocket. (Francois PIETTE)
3. Re: HTTPCli and proxy settings (Dod)
4. sending long strings? ([EMAIL PROTECTED])
5. Re: Newbie problems with TWSocket. (Wilfried Mestdagh)
6. Re: sending long strings? (Wilfried Mestdagh)
--
Message: 1
Date: Sat, 19 May 2007 19:15:25 +0200
From: balbaro [EMAIL PROTECTED]
Subject: [twsocket] Newbie problems with TWSocket.
To: twsocket@elists.org
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=us-ascii; format=flowed
Hello all,
I'm puzzled to find out what i'm doing wrong.
I made a component with both the TWsocketserver and A TWsocket as client
to be used in a app.
Server is running.
Can i connect and send a string in the same event ?
For example :
client.connect
wait for state connected
sendstring
close socket
Linemode := true and i added the endofline chars to the string.
Is this the correct method ?
Why is the first string always 'Server Ready ?
balbaro
--
Message: 2
Date: Sat, 19 May 2007 21:20:33 +0200
From: Francois PIETTE [EMAIL PROTECTED]
Subject: Re: [twsocket] Newbie problems with TWSocket.
To: ICS support mailing twsocket@elists.org
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; format=flowed; charset=iso-8859-1;
reply-type=original
I'm puzzled to find out what i'm doing wrong.
I made a component with both the TWsocketserver
and A TWsocket as client to be used in a app.
Server is running.
Can i connect and send a string in the same event ?
No. ICS is asynchronous. Calling Connect is just a reauest to connect. You
get control back from connect almost i;;ediately while the connection take
place in the background. When the connection finally establish (or fails
to), the event OnSessionConnected is triggered. You can start sending from
that event handler, or later.
For example :
client.connect
wait for state connected
You never wait for state connected. You write the code you need to do when
connected in the OnSessionConnected event hanlder, just like you never
wait
for the user to click on a button but you write the code to be done when
the
button is clicked in the OnClick event handler.
sendstring
close socket
Here again, Send is non blocking. It returns i;;ediately while sending
take
place in the background auto;atically. Data is buffered by TWSocket. When
buffer has been emptyed, you have OnDataSent event triggered. You can call
close fro; there, or even better Shutdown to gracefully break the
connection.
Linemode := true and i added the endofline chars to the string.
Is this the correct method ?
Line:ode only influence receiving: Co;plete lines are assembled before
triggering OnDataAvailable event. When sending the component send exactly
what you asked. You have to add yourself the end of line string if you
want
this to be sent.
Why is the first string always 'Server Ready ?
Not sure I understand. Please clarify.
[EMAIL PROTECTED]
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be
--
Message: 3
Date: Sun, 20 May 2007 00:46:07 +0200
From: Dod [EMAIL PROTECTED]
Subject: Re: [twsocket] HTTPCli and proxy settings
To: ICS support mailing twsocket@elists.org
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=us-ascii
Hello Arno,
Ouch...true ! I downloaded it 20 dec 2006 but forgot to install it !
regards.
AG Dod wrote:
Hello Arno,
I don't have OverbyteIcsWinsock2.pas unit in my ICS V6 installation...
AG Then you are using an old version. The unit also includes a function
AG to get systems interface list easily.
AG --
AG Arno Garrels [TeamICS