Hello Widita,
Those access violations never happened when LineMode is false...
Does anyone know the solution for this problem?
LineMode True or False has on itself nothing to do with AV. So on base
on this information nobody can give solution. There is something wrong
with your code but
Hello!
Yes, I'm going to use such long delimiter because I need to send binary
data...
If you're sending binary data, don't play with delimiters, but send the
data size first (as a 4-byte longint), then actual data. Client first waits
for data size, then waits for the data_size bytes and
WSocket will always trigger exactly one OnDataAvailable per line received.
Is this completely true. I'm sure in the past I've had a receive call
return multiple lines, something like This is one line'#13#10'this is the
next'#13#10'. And I had to split multiple lines, and process
so I can't call application.processmessages at all?
what can I call if I need my user interface updated? for example I changed a
Label's caption and need it refreshed when accepting data?
On 2/20/06, Wilfried Mestdagh [EMAIL PROTECTED] wrote:
Hello Arno,
what is message pump?
For
so I can't call application.processmessages at all?
Sure you can, but not from an event handler or you'll have problem reentering
events. You have the
same problem with a simple button: in the button OnClick, program a loop
calling ProcessMessage
during 30 seconds. You'll see that during this
Wow, my application really works much better after deleting all application
processmessages on my code...
On 2/20/06, Francois Piette [EMAIL PROTECTED] wrote:
so I can't call application.processmessages at all?
Sure you can, but not from an event handler or you'll have problem
reentering
I want to ask about line mode again,
You're welcome :-)
Is it right that in Line mode:
- DataAvailable will only be called when the data
received contains delimiter.
Right.
- DataAvailable could be called containing more than one line at a
time, we must splitting each line
On 2/20/06, Wilfried Mestdagh [EMAIL PROTECTED] wrote:
Hello Surabaya,
- If I send 1222bytes 5 times consecutively (delimited by
#13#10#10#13#11#11#13#10#10#13)
I'm not sure if this has ever been tested by such long delimiter string.
Wy such long delimiter ? Normally you need only
OK, thanks for your support, I'll try to edit my codes
I'll keep you informed about my results..
Regards,
Widita
On 2/20/06, Francois Piette [EMAIL PROTECTED] wrote:
I want to ask about line mode again,
You're welcome :-)
Is it right that in Line mode:
- DataAvailable will
Hello Widita,
Yes, I'm going to use such long delimiter because I need to send binary
data...
But your protcol will fail if this string is in the binary data you
send. Dont tell me the chance is low. Think on Murphy's law: if it is
possible then it will happen.
---
Rgds, Wilfried [TeamICS]
Hello Wilfried,
But you also could create a delimiter #00#00 and search if exists in
you data, then try #00#01 ... then #00#02 and if you reach #FF#FF add
a third delimiter #00#00#00, #00#00#01, #00#00#02 ... until you
finally found a delimiter that do not exists.
Of course this is not a really
Hello, somebody, help me...
after changing my application to line mode (binary send using line mode,
using 4 bytes of unique delimiter)
my application keeps giving me Access Violation Message
0x00406645:write of addess 0x00030e4c' or
0x77d4cd7f: write of address 0x00030ffc or
EAccesViolation
Hello, somebody, help me...
after changing my application to line mode (binary send using line mode,
using 4 bytes of unique delimiter)
my application keeps giving me Access Violation Message
0x00406645:write of addess 0x00030e4c' or
0x77d4cd7f: write of address 0x00030ffc or
Can I send directly everytime I call the client.Send(@sf, sizeof(sf))?
Does TWSocketServer have any property that allow me to send everything
without buffered first?
regards,
Widita
--
To unsubscribe or change your settings for TWSocket mailing list
please goto
On 2/19/06, Francois PIETTE [EMAIL PROTECTED] wrote:
Can I send directly everytime I call the client.Send(@sf, sizeof(sf))?
Yes, but pay attention to dynamic data which is represented by pointers.
Sending a pointer to a remote site is useless !
Dynamic data are long strings, objects,
to send everything without buffered first?
What do you mean by buffering first ?
It's something like this, when I send 2 packets consecutively, 1 after
another, it often received as one packet in the client side
(WSocket1DataAvailable event)...
This is how TCP stream is operating. In
On 2/19/06, Francois PIETTE [EMAIL PROTECTED] wrote:
to send everything without buffered first?
What do you mean by buffering first ?
It's something like this, when I send 2 packets consecutively, 1 after
another, it often received as one packet in the client side
Ok, then I must manage the received buffer by myself?
cutting and joining so that it can be interpreted perfectly by the
receiver,
is that right?
Yes and no :-)
TWSocket has a line mode in which it assemble (or split) packets for you.
You specify a delimiter (default to #13#10 but can be
On 2/19/06, Francois PIETTE [EMAIL PROTECTED] wrote:
Ok, then I must manage the received buffer by myself?
cutting and joining so that it can be interpreted perfectly by the
receiver,
is that right?
Yes and no :-)
TWSocket has a line mode in which it assemble (or split) packets for
Hello Surabaya,
if you send binary with LineMode there are many way to manage it.
The simplest : use BASE64 e-mail attachement style that is nice as
designed to work ascii lined mode but increase size of data about
+40% (as all binary e-mail attachements do by the way).
You could
What about Mimeutils.pas in ICS package?
Regards,
SZ
- Original Message -
From: Surabaya [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Sunday, February 19, 2006 7:42 PM
Subject: Re: [twsocket] Sending directly, not via Send Buffer
OK, I'll try the Base64 method
Yes, right now I am facing the same problem as Dan's
I'm receiving more than one line in a call of DataAvailable
does TWSocket has any property to set so that there will only be a line per
DataAvailable event triggered?
Set :
WSocket1.LineMode := TRUE;
WSocket1.LineEnd := #13#10;
22 matches
Mail list logo