Hello Arno,
Latest time I regulary get reply's to some questions, and the questions
follow hours after it. Seems you have sortof same problem.
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz
Friday, November 3, 2006, 12:17, Arno Garrels wrote
Hello,
> Sorry mixed it up with with a 0 result 0 means a closed connection,
> -1 means an error, check LastError.
Correct that it is an error, but no need to check LastError. TWSocket
take care of the error if it happens here. Just Exit OnDataAvailable
when Receive returns <= 0.
---
Rgds, Wil
Hello Jack,
> I have a TCP socket client. In some cases, OnDataReceived()
> gets fired for multiple times with ErrCode = 0
I never have seen a winsock error in OnDataAvailable. You can ignore the
check in that event safely.
> Receive() the return value is always -1 so the application can
> not r
Hello Francois,
> IMO, you have all the required tools !
Agree for 100% !
Definitively no need to put wishels and bells into TWSocket !
All the tools are there, this is up to derrived components and or
applications.
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
ht
Hello Clay,
> Maybe a typo error ?>>
> No, all that code was copied-and-pasted from TCPSrv1.pas.
Maybe you cast the wrong object ?
In a TWSocketSErver event, the Sender argument is TWSocketServer, the
Client argument is your clientclass. In the events of the datasockets
the Sender argument is you
Hello Clay,
Seems you mix up 2 different things:
> When I send a string from my test utility, the ClientConnect() event(*)
> fires in my app, which is listening for messages, but the
> ClientDataAvailable() event(**) is not fired.
You cannot send data if there is no connection. The OnClientConne
Hello Clay,
> OK, by going over the clidemo and TCPServ projects (which successfully
> communicate with each other) with a fine-toothed comb, and setting all my
> design-time and run-time properties, etc., as in those demos, I was able to
> get it to work.
Good :)
---
Rgds, Wilfried [TeamICS]
Hello,
Anyone experianced TCP problems on windows 2003 ? I have 2 applications
(client / server - TWSocket) talking to each other. Customar run both of
them on 1 machine: W2003 SP1.
When 1 side send mutch data (5..10 Kb chuncks) it seems the other end
(whitch is sending ACK and so [small packets]
and it works great. My Client / Server app is
> more heavy, it can have transmissions for over 100mbps, but it handles
> without problem.
> What version of ICS you are using? I´m using the latest v6 beta and it works
> fine.
> Éric
> ----- Original Message -
> From: "
Hello Jack,
I think you have to check your event handlers for exception. BGException
is fired when exception comes from the message pump. But most event
handlers are fired from the message pump as well.
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestd
Hello,
Prolblem found and solved :) Thanks for the replys. The main problem was
that if large traffic in 1 direction there was no traffic in the other
directions. It was simple:
My comm program was sitting in a DLL. TWSocket communication in a
separate thread for in case the DLL-caller has no mes
Hello Jack,
> Do you mean I should check the ErrCode in the event handlers
No check for exceptions.
BGException is fired if exception comes from the middle of nowere, that
is the message pump. But many events are called from within the message
pump. This means if you have an exception in your co
Hello,
I have just written a small mail redirector. What I do is receive the
mail with TPop3Cli and send it without touching the headers with
TSmtpcli. Works nice, but have 1 question:
What should I fill in the SmtpCli.FromName (MAIL FROM) ?
Should this be a local address (a mail account from th
ecember 3, 2006, 15:38, Francois PIETTE wrote:
> I would use the original.
> --
> [EMAIL PROTECTED]
> http://www.overbyte.be
> - Original Message -
> From: "Wilfried Mestdagh" <[EMAIL PROTECTED]>
> To:
> Sent: Sunday, December 03, 2006 3:10
Hello Marcelo,
> I can't even catch the exception
Are you sure you dont have a duplicate copy of WSocket.pas where source
is a little different ? It should be possible to catch the exception. If
you cannot it has somethign to do with the debugger looking in a source
that is not the DCU.
---
Rgds
e the server will do a range of retries ? It should be a 5xx
which is permanent then it will go back to the sender without retry.
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz
Monday, December 4, 2006, 12:39, DZ-Jay wrote:
> On Dec 3, 2006
Hello Henrik,
Do you have the same problem in the IDE ? Because this way you can
check witch code line never comes back (freeze). If not eventually open
a console window and write some debug information into it to see where
it happens.
Your approach is normal. I do this all the time, however I a
Hello Henrik,
this is frustrating :(
When the trace dissapears it could also be an AV (unles you have 'stop
on exceptions' enabled in the IDE).
Can you send me the offending project in private mail, including source
and the compiled exe file ? I can do a test on several computers if you
want. Ple
/eng/overbyte/teamics.html
http://www.mestdagh.biz
Thursday, December 14, 2006, 14:39, Arno Garrels wrote:
> Wilfried Mestdagh wrote:
>> Hello Henrik,
>>
>> this is frustrating :(
> Welcome to the club.
>> I can do a test on several
>> computers if you want. P
Hello Henrik,
> * My workaround so far is to create another smtp component
> that exists all the time the application is running. I
> now discovered that this is also true with the Wsocket
> component. For instance put it on the main form and
> everything works on all computers.
Could it
Ok, so it is working, but still remains the question wy the dynamically
loading of winsock should not work as it should on some machines ?
Arno, you mention a virus, but should it then work with the
ForceLoadWinsock ? I recall virusses that did some things with the TCP
stack, but it was more the s
Hello Henrik,
What you could do is set in IDE some breakpoints at the places the dll
is loaded / unloaded. To see if this mechanism is working fine on the
offending machines. It is a counter that increment / decrement to decide
if winsock should be load or unload.
That's the best idea I have so f
Query)
> constructor TCustomWSocket.Create: 1 -> 2
> procedure SafeIncrementCount: 2 -> 3
> procedure SafeDecrementCount: 3 -> 2
> procedure SafeIncrementCount: 2 -> 3
> procedure SafeDecrementCount: 3 -> 2
> procedure SafeIncrementCount: 2 -> 3
> procedure SafeDec
220 ironport.bredband.com ESMTP
00C8242C >> QUIT
> 00C8242C < 221 ironport.bredband.com
> 00C8242C Closed
> (second time. Host=smtp.bredband.net)
> 00C83960 DNS Lookup for smtp.bredband.net
> Freeze/Hang but possible to move window
> -Ursprungligt meddelande-
Hello Henrik,
> use the same test with Indy everything works fine! What is ICS doing that
> none of the other smtp components or applications are not?
Indy and many others use blocking calls to winsock while ICS uses the
non blocking calls.
I suggest you keep on using the ForceLoadWinsock to kee
Hello Henrik,
> It could be an error in the Winsock load/unload of ICS.
Or a windows bug for the dynamically load / unload. Or a winsock
bug because of the dual cpu. Or some combination.
The latter is easy to test. Put in boot.ini:
/NUMPROC=1
or
/ONECPU
and reboot.
---
Rgds, Wilfried [TeamICS]
Hello Henrik,
> I can not spend so many more days on this now (the same for You I would
> imagine) so I'm planning to return to Indy as long as I can solve their
But you can safely use ForceLoadWinsock ! There is absolutely no problem
to use it. Only me (we) wanted to dig out where the problem is
Hello David,
Please do not hit reply if you start a new thread, but start a new
message. Your message will not be seen by many people who are not
following this thread!
I have removed the followup, so this reply should appear as a new
thread.
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/e
Thank you !
I also want to whish all of you and your familie my best whishes.
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz
Tuesday, December 26, 2006, 16:11, Francois Piette wrote:
>> Hello:
>> I just wanted to wish Francois and everybody
In addition it also has a nice side effect. When it is set and you dont
want to receive for a while then just dont receive in OnDataAvailable.
Then from that moment OnDataAvailable will not fire until Receive is
called once again.
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/te
Hello Aleksey,
There is really not mutch difference between pascal and c. Please look
carefully and you know it in minutes. To give a few examples:
:= =
begin {
end }
= ==
. -> if it is a pointer
var need in c the &
and a few other minor things.
if something you dont understeand please ask.
---
Hello,
I did a quick look. It seems you start (or resume one from pool) a
thread and give the received data to it.
Probably you give data again to a thread that is still busy with the
previous data. You have to check for this somewhere because you tell
about corrupted data with many threads.
---
Hello Bevan,
It is normal that you receive an empty string once a while. Just exit
the OnDataAvailable event in that case. When data is really ready to
receive OnDataAvailable will fire again.
About the 10035 yo dont have to worry. This is internally handled by
TWSocket.
---
Rgds, Wilfried [Team
Hello Tobias,
> TCP/IP connection with high round trip times and small packet sizes
If packets are < max MCU then Nagle will come in and will wait a while
to see if you want to send a packet again. Nagle does this to try to
concat packets to a larger one to fit into the max packet size.
Specially
Hello Bevan,
I'm not a CBuilder specialis but:
> AnsiString msg = ((TWSocketClient*) Sender)->ReceiveStr();
This is a good typecast. It tells the compiler that Sender is of type
TWSocketClient, so compiler can do the exact address offset
calculations within the type. You still have to check if
Hello Tobias,
You find on my site a few programs to test performance with TWSocket.
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz
Monday, January 15, 2007, 16:33, Tobias Rapp wrote:
>> To improve performance you can make your packets equal
Hello Tobias,
> Looks like
> http://support.microsoft.com/default.aspx?scid=kb;en-us;823764 is wrong
> in my special case or the system is automagically increasing the
Can you resent the URL please ? It seems dead here.
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.htm
Hello Jack,
It's a while ago, but possible OnDataAvailable is fired when you call
Pauze. If this is the reason you can set a flag to call it only 1 time.
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz
--
To unsubscribe or change your settin
Hello Michael,
In addition to the reply of Arno:
> Currently, I have a loop after calling Connect() looking like this:
> while not FlagDone do begin
> Sleep(50);
> end;
If this works then be aware that you call connect in another thread as
the thread where the component is executing. Maybe it
Hello Veit,
Normally the components handles their own exception by design (as it
should be). Be sure you have no exceptions in events. If there is a
chance that your code can raise an exception then you should have that
event into an try excpet block and handle it.
---
Rgds, Wilfried [TeamICS]
ht
Hello Arno,
> Perfect chaos, sorry. Please ignore this mail.
That's because we are programmers :) However there is one thing. Hitting
'reply to all' does address the mail also to the original poster. I dont
like it as it start often private mailings. And 'reply to all' is a
common used button in
s. I would have expected that the try/except
> block is left right after calling connect and not only until the
> connection is established or an exception occurs. Could you please
> explain this?
> Veit
> Wilfried Mestdagh wrote:
>> Hello Veit,
>>
>> Normal
Hello Fastream,
> Something specific to client's server I guess. Is there a way to see which
> line number did it got stuck without installing the compiler there?
I suggest a lot of debugging code in a file. Put it between a global
#define do that you can remove it with just one line in comment.
Hello Markus,
LocalAddr returns the IP address the socket is bound to. PeerAddr is the
address on the other end.
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz
Sunday, January 28, 2007, 10:47, Markus Humm wrote:
> Hello,
> I've a TCP clien
Hello Jonathan,
> j'avais oublier que tu parlais francais:)
Yes and some other too here. But the list is English, so many people
will not understeand and can also not answer then :( So better stay in
English :)
> Merci pour les infos. Je vais changer BufSize pour 65535. j'ai besoin de
> faire l
Hello Jonathan,
> est-ce que je peut le faire aussi du coté Client ?
Yes also the client part. If you do not you will not receive sutch large
datagram at once.
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz
Wednesday, January 31, 2007, 19:2
Hello Arno,
> propably you need to pause receiving when receiving
> is much faster than decoding to prevent infinite grow of your buffers.
The problem is UDP. When winsock buffer is full UDP packets are trown
away. Maybe no problem ? Maybe better to store on disk to not loose
anything and give t
Hi,
> It is just a simple constant, why shouldn't it be 800 instead of 100??
Because it is not the source of a bug. No need to change anything if it
is not buggy. Changing it and then your code works does not prove there
is a bug.
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/
Hello Markus,
This is how TCP works. OnSessionClosed is fired when the other end say
"Goodbye", or when you try to send something and the other end is not
their anymore. There is no traffic if there is no data send, so TCP
layer cannot know if for example cable is plugged out.
So you have to do s
Hello Markus,
you can sleep on both of your ears :)
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz
Monday, February 26, 2007, 20:38, Markus Humm wrote:
> Hello,
> as I found out that FReadCount wasn't prevented
> from overflowing I'm left
Hello Jack,
If I recall well he wanted to do mulitple reads in OnDataAvailable. It
is not encouraged to use it as it is not tested in later versions.
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz
Wednesday, March 7, 2007, 23:51, Jack wrote:
Hello Andy,
Dont forget to set the Multithreaded property to True !
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz
Thursday, March 8, 2007, 19:18, info2004 wrote:
> SZ,
> I had a look through the list and saw the ref's to get and peek etc.
Hello Fastream,
You should do nothing. It is the task of the client to reconnect if
session is broken.
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz
Friday, March 9, 2007, 11:10, Fastream Technologies wrote:
> Hello,
> I have the followin
Hello Jack,
This seems OK. Indeed if you set wsoNoreceivedLoop in the
OnDataAvailable handler it will hot have an effect when there is still
data to receive and with this fix it is.
Another possibility is that you set wsoNoreceivedLoop beforehand at
creation time of TWSocket, then you dont need t
Hello Markus,
TCriticalSection will protect your StringList among multiple threads, so
that's ok.
---
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.elis
Hello Fastream,
If this is a windows error then it is ERROR_OUTOFMEMORY.
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz
Sunday, March 18, 2007, 14:59, Fastream Technologies wrote:
> Hello,
> What does this error mean? I get this when I ope
Hello Matthew,
You can start sending in OnSessionConnected, but only if there is no
error code. Probably OnSessionConnected is fired with an errorcode,
please check this because it will lead to the real error. Same thing in
all other events. If there is an error at least log it.
---
Rgds, Wilfrie
Hello Clay,
> The message is getting sent (received by the Server app), but then the
> Client app locks up. Why would this be?
What exacly mean by 'locks up' ? Is the application not receiving
windows messages anymore (eg mouse clicks and so), or something else ?
> And also: Why wouldn't the sen
Hello Clay,
> The app became totally unresponsive. As mentioned in an earlier post, I
> think, though, I fixed it by calling TWSocket's Close() method.
You you have an OnDataAvailable handler and if yes, do you receive
always all data ?
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/ove
Hello Markus,
> As it is now I've some thread which gets a message posted from the queue
> when new data is added. It reads the queue then and sends the data via
> the socket. The socket hasn't been created within that thread. I feel
> this is bad design because it doesn't seem to be really relia
Hello Engi,
> I create an instance of TWSocketServer in each thread with same address but
> different port.
> Is this a problem ?
No this is not a problem. the Addr:port combination has to be exclusive,
but this is already what you do.
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/over
Hello Éric,
> Actually I thing that this exception was raised because of the
> architecture of my software and I need an opinion about that.
What is exacly the exception message ?
> when I have some hosts down. My app has a Timeout parameter (Default 4
> seconds) when if it doesn´t receives vide
Hello Éric,
> The exception that was raised was "Socket operation on non-socket (#10038 in
Possible the socket was already destroyed. Other possibility is that
somewhere some pointer is pointing wrong or is been overwritten. Very
difficult to say.
> came to see on the morning the whole window
Hello Jonathan,
Yes RcvdCount is not reliable according to Microsoft. You should try to
receive anyway and check the returned Count value from the Receive
method.
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz
Wednesday, April 18, 2007, 16:3
Hello Gary,
You can also use OnSendData witch is fired every time a packet is
delivered to winsock (dont confuse with OnDataSent).
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz
--
To unsubscribe or change your settings for TWSocket mailing
Hello,
Some versions of outlook if they send an euro sign '€' then they send
the body base64 encoded like this: 4oKsDQo= (which is the euro and a LF
after it).
Strange thing is that after decode it with TMimeDecode, it produces 4
characters: E2 82 AC 0A (the 0A is the LF of course).
Question is
Hello,
Seems to be the charset UTF-8.
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz
Monday, May 7, 2007, 11:01, Wilfried Mestdagh wrote:
> Hello,
> Some versions of outlook if they send an euro sign '€' then they send
&
Hello Markus,
You dont have to loop. Just set a Timer and Connect, that's all. You can
disable the Timer in OnSessionConnected. If timer expires just call
Abort. When OnSessionClosed is called set a flag. When OnRequestDone is
called and session is closed start your next connection (depending on
s
Hello Markus,
Looks ok at first sight. But wy not create / destroy the component in
the thread's Execute ?
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz
Sunday, May 13, 2007, 16:25, Markus Humm wrote:
> Hello,
> I've tested one of my idea
Hello Balbaro,
> Why is the first string always 'Server Ready" ?
Look at the Banner property in TWSocketServer. YOu can set this to ''
in your code just before you call Listen if you dont want a Banner, or
you can set your own.
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/
Hello Entelone,
> sending this to the TWSocket on the client application? Should the
> rows be appended together into 1 large string and then seperated by
> the client? Should the rows be sent individually? Or what?
In fact it does not matter. It purely depents on your application and
what
Hello Balbaro,
> 1) connect the client
> 2) in Client.SessionConnected event : send the string
> 3) In Client.Datasent event : client.closedelayed
No. This will not garantie that the data is arrived by the server. You
can make a protocol for it, so that the server send back ACK "after" it
has han
Hello,
I want to send mail with TSmtpCli with a few attached file. But I really
do not want to create files on the disk unless absolutely nececarry.
But I'm a little stuck on how to attach files because it seems to be
designed to only get them from disk or is there something I do not see ?
To be
Hello Éric,
Maybe your server is busy with something and not pumping messages ?
You also should set a timer to abort after a certain timeout if
connection fail.
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz
Saturday, May 26, 2007, 17:47, Ér
Hello,
> However the first time it goes well, but refreshing a page gives me
> Error 10022 in function WSAAsyncSelect Invalid argument
You probably have a wrong pointer somewhere or destroyed something where
still a reference is to.
> after the
> first call the component thinks that I have not s
Hello Allan,
TServerSocket and TClientSocket are not ICS components !
But you cannot recognize a firewall. If it is configured to refuse
connections then you just will have refused connections.
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz
Hello Paul,
> So as long as the Forms unit in included in the project's uses clause, I
> don't need to define NOFORMS in any of the threads ?
correct
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz
--
To unsubscribe or change your settings
Hello,
A happy birthday for you Francois !
--
Rgds, Wilfried
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
Hello,
> Why would a servef all into a state in which when a client connects it sees
> 10053? I see 10053 when I connect to my customer's site with HTTP client
> demo after 2 hours! Not 10060, 10061 but 10053!
A 10053 is 'software caused connection abort'. Normally this is a
routing or some other
Hello,
> So how to overcome it? Francois says the Winsock would timeout at some time
> and raise an error but that does not seem to be the case! Seems to me that
The 10053 is in OnSessionClosed yes ? So all you have to do is reconnect
over there.
> there are CLOSE_WAIT state sockets aggregating
Hello,
I'm not 100% sure, but it could be that in some circumstances events are
not fired in same sequence as before, which would have impact on
existing applications. Or am I wrong here ?
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz
Thurs
> Currently, when dnslookup is aborted, it calls StateChange(httpReady) twice,
> first one triggering requestdone and the second one is where this should be
> because that's the real end of operation (message flow).
oke
> Debug and see!
sorry I cannot at the moment as I'm in the middle of a hug
Hello Mike,
Can you please start a new thread if you do so instead of hit reply ?
Many email readers can sort on thread, so if you do so people that are
not interested in the thread where you reply to will never see your
message.
About your question. You have to put the second code after the firs
Hello,
> What does ListenBacklog do?
It sets the maximum number of connections that are pending for
acception. For example, if it is set to 5, and there are 10 clients
connecting at the very same moment, only 5 will be in that queue.
Normally you will never have problems with it if you accept ver
Hello brian,
> I thought the fragmented packets didn't happen with UDP though? that
> boundaries were respected?
Yes boundaries are respected with UDP. Don't make your packets too
large. Look at internal buffer of TWSocket.
> Why is the event triggered with empty data?
I don't know. Using TCP j
Hello Brian,
Not tested. This echo back a received packet from a listening UDP socket
to the other end:
var
Buffer: array [0..1023] of char;
Len: integer;
Src: TSockAddrIn;
SrcLen: integer;
begin
SrcLen := SizeOf(Src);
Len := FUDPServer.ReceiveFrom(@Buffer, SizeOf(Buffer), Src,
Hello Edward,
Possible you ran out of buffer space. Winsock use non pageble ram. The
non pageable ram can grow to max 1/8 the size of total ram. Depending on
traffic each socket need about 6 KB of it. And lots of other
applications uses that part of RAM also (all overlapped IO for example).
After
Hello Erich,
I see in your other mail that your problem is solved. So here I try to
answer to your additional questions.
> What influences how much buffer RAM is used by each socket.
It is the socket itself and also the data. A socket takes around 4 KB.
Overlapped IO takes also pages of 4 KB but
Hello Lorenzo,
You only can call Receive or ReceiveFrom 1 time in OnDataAvailable.
Don't loop in it as in your example. This could be the trouble. If you
don't have received all available data then OnDataAvailable will fire
again and there you receive the rest.
However with UDP packet bounds are
Hello Lorenzo,
I see one bug. Possible that's the reason:
FromIPLen = sizeof(FromIP); // Add this !!
rec = server->ReceiveFrom(block, sizeof(block), FromIP, FromIPLen);
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz
--
To unsubscribe or
Hello Éric,
Just call Listen method in an exception block. If exception then choose
another port and call Listen again, and so on.
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz
Saturday, September 15, 2007, 19:09, Éric Fleming Bonilha wrote
Hello Clément,
> I searched some examples, but most of them use LineMode and LineLimit. I'm
> afraid
> that's not an option.
Wy is that not an option ? What is the problem with it ? Just terminate
your data with a charcter that cannot be in the data itself and your
whole problem is solved.
>
Hello David,
> On a certain XML packet/event I'm getting duplicates (x3). It may
> well be that they are sending the same packet multiple times but I
> wondered if it's anything I am doing that could cause this?
Something that can cause this (and other strange behaviour) is if you
call direct or
Hello David,
Eventually you can check with SocketSpy what exacly is sent.
---
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/
Hello Olivier,
> The NotifyDataAvailable sets a flag in an object associated to the
> client socket that will then read the available bytes. But it will not
> do so immediately
That's the problem. You have to read "all" available data "In" the
OnDataAvailable event. If you do not then OnDataAvail
Hello Clément,
> Ok. But can I place a LineLimit over 200kbytes? or better yet,
> unlimited? (those help files can get very big may be over 1Mb)
Yes. Since you connect to a known server you dont have to be afraid of a
DOS attac. So set LineLimit := $7FFF; which is the highest possible
value.
p://www.mestdagh.biz
Wednesday, September 26, 2007, 15:38, Olivier Sannier wrote:
> Wilfried Mestdagh wrote:
>> Hello Olivier,
>>
>>
>>> The NotifyDataAvailable sets a flag in an object associated to the
>>> client socket that will then read
gt; OnDataAvailable event.
> How may this be prevented? I cannot disable all messge processing in
> my app whilst it's in the OnDataAvailable event.
> On 26/09/2007, Wilfried Mestdagh <[EMAIL PROTECTED]> wrote:
>> Hello David,
>>
>> Eventually you can check
Hello Olivier,
> I can't use LineMode, what is transferred is purely binary.
See http://wiki.overbyte.be/wiki/index.php/Sending_and_receiving_data
that discusses some possible data transfer modes.
> buffer and rely on the one from the API itself.
> I tried it, it works fine, but is it be a "nice
Hello Olivier,
I dont have the demo at hand. But if all your clients are executing in
same thread context you do not have to lock things between the clients
itself.
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz
Thursday, September 27, 2007,
1 - 100 of 770 matches
Mail list logo