Re: [twsocket] newb using TWSocket for the first time

2007-09-26 Thread Arno Garrels
David Perkins wrote: > By custom message handler, do you mean use a message map and define a > new message type something like WM_USER+100? Yes, you can also post the custom message to the hidden window that all ICS components own and override component's WndProc() to handle the new message, not

Re: [twsocket] newb using TWSocket for the first time

2007-09-26 Thread David Perkins
Thanks Wilfried/Francois At the moment this is just for a simple test app that talks to a third-party server. My comms class allows the GUI (or any class for that matter) to register an event to be called when a certain data packet is received via the socket. It just so happens in this case that

Re: [twsocket] newb using TWSocket for the first time

2007-09-26 Thread Francois Piette
> I now suspect that the data is only being sent once. > > When I receive a certain packet I pop up a messagebox asking the user > a question and I suspect it is this that is causing the packet to be > repeated since it is ultimately being displayed by a call from the > OnDataAvailable event. > > H

Re: [twsocket] newb using TWSocket for the first time

2007-09-26 Thread Wilfried Mestdagh
Hello David, Yes, a modal form is pumping messages. If it is really nececary to popup a form if you have received a certain packet, you have to create / show the form "outside" the OnDataAvailable event. To do it outside just post a message to a custom message handler. Your custom message handler

Re: [twsocket] newb using TWSocket for the first time

2007-09-26 Thread David Perkins
I now suspect that the data is only being sent once. When I receive a certain packet I pop up a messagebox asking the user a question and I suspect it is this that is causing the packet to be repeated since it is ultimately being displayed by a call from the OnDataAvailable event. How may this be

Re: [twsocket] newb using TWSocket for the first time

2007-09-26 Thread Wilfried Mestdagh
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/

Re: [twsocket] newb using TWSocket for the first time

2007-09-26 Thread David Perkins
Thanks Wilfried The app uses a main form with some buttons for the user to log in and send packets, but there is no additional message pumping going on. It only happens on one particular packet type they send so I'm hoping it's them On 26/09/2007, Wilfried Mestdagh <[EMAIL PROTECTED]> wrote: >

Re: [twsocket] newb using TWSocket for the first time

2007-09-26 Thread Wilfried Mestdagh
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

[twsocket] newb using TWSocket for the first time

2007-09-26 Thread David Perkins
Hello I am trying to use TWSocket to talk to a third-party server app that will send smallish XML messages back and forth. I'm using LineMode with LineEnd = "\n" and have set Multithreaded to true. I read the packets in the OnDataAvailable event where I use a 10kb buffer which I zero before rea