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 stor
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 witho
Those access violations never happened when LineMode is false...
Does anyone know the solution for this problem?
I've converted my binary data to hexadecimals string (twice size) but safer
in converting... the access violation shouldn't be in the conversion
the delimiter is #13#10
On 2/21/0
On 2/21/06, Francois Piette <[EMAIL PROTECTED]> wrote:
>
> > 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 addes
> 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
> EAc
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 Ac
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 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]
h
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:
> >- DataAvaila
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
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 1 or 2 character.
If you do this because you maybe send bin
> 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
I want to ask about line mode again,
Is it right that in Line mode:
- DataAvailable will only be called when the data received contains
delimiter.
- DataAvailable could be called containing more than one line at a
time, we must splitting each line manually
- If I send 1222byte
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
> reente
Hello Surabaya,
Why do you want to refresh it manually, doing a label.caption change
within OnDataAvailable should work.
But you could do all Socketing things in a thread and then use a timer
(every second for example) in your main form that get info in
synchronized way, you may also
Surabaya wrote:
> so I can't call application.processmessages at all?
Don't process messages directly or indirectly from within
event handlers, because the event may be reentered, this isn't
an ICS issue but Windows design. Same applies to a OnClick
event as well.
> what can I call if I need m
> 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
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?
> > Fo
Hello Arno,
>> what is message pump?
> For instance Application.ProcessMessages or anything else that
> processes messages.
Or creating a modal form. ShowMessage etc, are also modal forms. Often
done for logging whilst developping. Better is to log to a console
window or a memo or whatever.
---
Surabaya wrote:
> What do you mean about this statement?
> "calling the message pump from an event handler"
>
> what is message pump?
For instance Application.ProcessMessages or anything else that
processes messages.
Arno
>
> thanks
>
> On 2/20/06, Francois Piette <[EMAIL PROTECTED]> wrote:
What do you mean about this statement?
"calling the message pump from an event handler"
what is message pump?
thanks
On 2/20/06, Francois Piette <[EMAIL PROTECTED]> wrote:
>
> > Yes, right now I am facing the same problem as Dan's
> >
> > I'm receiving more than one line in a call of DataAvailab
Hello Francois,
And of course do not forget to escape the escape sequence itself if it
is already present in your original data.
You could also do a two-pass sending, first one send a position table
of delimiters located in your data, other send binary data with
delimiter replaced with
> > 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 i
> 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#
t; - Original Message -
> From: "Francois PIETTE" <[EMAIL PROTECTED]>
> To: "ICS support mailing"
> Sent: Sunday, February 19, 2006 3:57 PM
> Subject: Re: [twsocket] Sending directly, not via Send Buffer
>
>
> >> Ok, then I must ma
- Original Message -
From: "Francois PIETTE" <[EMAIL PROTECTED]>
To: "ICS support mailing"
Sent: Sunday, February 19, 2006 3:57 PM
Subject: Re: [twsocket] Sending directly, not via Send Buffer
>> Ok, then I must manage the received buffer by myself?
&
> OK, I'll try the Base64 method
It is more efficient to use a simple escape mechanism.
Let's say your delimiter is #13#10 (this is handy if you test with telnet).
The select another character which is likely to be infrequently use in your
binary data. Let's assume it is #127.
Then it is enou
t;ICS support mailing"
> Sent: Sunday, February 19, 2006 7:42 PM
> Subject: Re: [twsocket] Sending directly, not via Send Buffer
>
>
> > OK, I'll try the Base64 method
> >
> > Do you have any recommendation about Base64 encoding/decoding library?
> &
What about Mimeutils.pas in ICS package?
Regards,
SZ
- Original Message -
From: "Surabaya" <[EMAIL PROTECTED]>
To: "ICS support mailing"
Sent: Sunday, February 19, 2006 7:42 PM
Subject: Re: [twsocket] Sending directly, not via Send Buffer
> OK, I'll
OK, I'll try the Base64 method
Do you have any recommendation about Base64 encoding/decoding library?
On 2/19/06, Dod <[EMAIL PROTECTED]> wrote:
>
> Hello Surabaya,
>
> if you send binary with LineMode there are many way to manage it.
>
> The simplest : use BASE64 e-mail attachemen
> I'm going to send binary data, using 5 characters delimiter... is it safe?
Yes, provided your delimiter is not within the data !
If data must contain the delimiter, then you have to escape it.
--
Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
http:/
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
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)
- Original Message -
From: "Surabaya" <[EMAIL PROTECTED]>
To: "ICS support mailing"
Sent: Sunday, February 19, 2006 5:54 PM
Subject: Re: [twsocket] Sending directly, not via Send Buffer
> 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 you.
You specify a delimiter (default to #13#10 but can b
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
> > (
>>> 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.
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
> 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, dynamic arrays, pointer to
anything,...
> Does TWSocketServer
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 http://www.elists.org/mailman/lis
40 matches
Mail list logo