NetTalk Central

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Simon Kemp

Pages: 1 [2]
16
Me again. Bruce, you said:-

> There are ways of "checking if anything is waiting" in either case (ie simulating a notification event) if you are in this sort of position.

Could anyone expand on that (simpleclient). Seems to raise the possibility of running without a window and accept loop, which might be ideal for this...

Thanks
 

17
Thanks Bruce,

SimpleClient and definitely not opening any windows.

There happen to be two NetSimple classes working on the same window but know that's not a challenge for NetTalk and 99.99% percent of the time everything works perfectly.

We've got the usual problem that we can't reproduce the issue or think why it would happen.

While I've got your attention. In real life, is it ever the case that packets can be severely delayed, arriving in NetTalk (say) 10 seconds after they appear to have been sent? The FIX protocol includes a SendingTime that tells us the other side have done their job and sent stuff winging our way...

Simon
 

18
Hi Bruce,

I'm working on a NetTalk-dependant application that is rather time-sensitive. Happens to use the FIX protocol to go about it's business (via NetTalk and the NetSimple class), placing orders on trading platforms ("buy x USD", "now's a good time to buy y CHF"). Very, very occasionally things go pear-shaped and our logging shows that unexpected seconds have past since we got a look (NetSimple.Process) at incoming packets from the platforms.

I'm not suggesting any problem with NetTalk, it smells like the relevant window "our side" is locking-up, not responding to events sent from NetTalk ("come get your packet") and we see it "late". But we are finding it difficult to diagnose what's happening during these very rare events. NetTalk's outputdebugstring logging isn't relevant here because we can't reproduce the problem, we need extra information to stuff into our disk logs on the machines that are running the application for real. That would help us zero-in, eliminate some suspicions, etc.

Short story is I'm wondering about two additions to your underlying "Packet" structure (the thing I look at in NetSimple.Process):-

#1. Haven't read too much about it, but think TCP can include an optional "sender timestamp". You can only know more about it than me, but if it's available then would it make sense to pass it "up" from NetTalk?

#2. Less vague, this is about inter-thread communication. In some way, maybe simple as today() and clock() tell the destination thread when NetTalk saw the thing (packet). Right now, it would be invaluable in trying to identify what's going on. We could stuff it in our disk log and see what it proves / disproves.

Not sure that's making a right lot of sense but I tried  :)

Thanks,
Simon
   






19
Web Server - Ask For Help / Re: Open a file in client's browser?
« on: November 28, 2007, 03:35:32 AM »
Hi Bruce,

Thanks for all your help so far. And a steer on "tickling" would be very much appreciated!

All the best,
Simon

20
Web Server - Ask For Help / Re: Open a file in client's browser?
« on: November 22, 2007, 11:21:41 AM »
A related question:

My NetWebPage is calling a (possibly lengthy) procedure to generate the xls it will supply using _sendfile(). Lengthy enough that a browser will give up waiting.

Chris Cordes "progress page" posts in the share knowledge forum have got me started in the sense that I'm definitely 'tickling' the browser to keep it interested. BUT, because I ultimately need to just poke an xls (p_web.ReplyContentType = 'application/vnd.ms-excel' then 'p_web._Sendfile(loc:xlsname)') things aren't working too well.

At the moment, I'm 'tickling' by sending a short blank string (please don't laugh, I'm a newbie remember):-

mytickler   string(' ')
p_web.ParseHTML(mytickler, 1, size(mytickler), NET:NoHeader)

More by luck than judgment, IE seems happy with this - it waits, waits, waits and then accepts the xls correctly. Firefox is not happy, offers to save but has lost knowledge of the content type.

So (and I'm not even sure this is the right question), just how do I keep a browser happy while it's waiting to receive my damn xls?

Thanks,

Simon

 

   


     

21
Web Server - Ask For Help / Re: Open a file in client's browser?
« on: November 22, 2007, 02:38:02 AM »
Hi Bruce,

So would this be the best way to handle something like an "unsubscribe" link in emails? Build your database sysid into a url:

http://someservername/unsubscribefromsomelist_9873546

Then call a page based on "unsubscribefromsomelist"? Maybe obfuscate the sysid along the way?

Thanks again,

Simon

22
Web Server - Ask For Help / Re: Open a file in client's browser?
« on: November 20, 2007, 06:14:05 AM »
Thanks Bruce,

Starting to make a lot more sense now.

>> nope, you can't do this. The _browser_ determines the name, not the server. ie the Browser "asks" for a file, and it always does the save-as with the name it asked for. There's no way for the server to say "hey, you asked for a.xls, but actually I'm sending you b.xls instead".

Found a slightly messy way around this. Construct the "spreadsheet" url dynamically along the lines ClientName_StockList_yyyymmdd, then in the WebHandler check for urls containing _StockList_yyyymmdd and call a common procedure. Rather pleased with myself  ;D

All the best,
Simon

23
Web Server - Ask For Help / Re: Open a file in client's browser?
« on: November 20, 2007, 01:11:50 AM »
Hi Bruce,

That really helped, thank-you (in fact a fair bit was in the FAQs, apologies). Three more questions I'd appreciate anyone's help with:

1. What types of procedures are automatically handled by the WebHandler? It looks like NetWebForm, NetWebPage etc always get in there but I don't understand how in example 14 'MailboxesReportWithOptions' (a Report) gets into the list. In particular, I wanted to use a simple source procedure, prototyped (NetWebServerWorker p_web) and containing the magic p_web._Sendfile(). I ended up putting some handcode into theWebHandler so it would "serve the procedure". Must be the wrong way?

2. How do I put some simple text on a tab on a NetWebForm (some "notes" for the user)?

3. When using p_web._Sendfile() is there a way to override the url being used as the filename? What I mean is my excel file always opens as "StockListToExcel.xls" based on the server procedure name - I'd like to change it to "Client Name dd_mm_yyyy.xls" (for example).

Thanks again for your patience!

Simon

24
Web Server - Ask For Help / Open a file in client's browser?
« on: November 19, 2007, 01:40:30 AM »
Me newbing again.

Could someone briefly explain the steps to send a file (it's a spreadsheet) to client browser? I see example 14 pushing a pdf but can't see how/why it works. It also seems the file is deleted after it's sent - is that correct and what triggers it?

Also, is it possible to do more of a filedialog/save kind of thing?

Many thanks,

Simon

25
Web Server - Ask For Help / Re: Newbie needs help - three questions
« on: November 17, 2007, 01:24:57 AM »
Hi Bruce,

Thanks for this. I'm at the bottom of a steep learning curve and it's all a bit daunting at present!

Simon

 

26
Web Server - Ask For Help / Re: Newbie needs help - three questions
« on: November 13, 2007, 03:25:36 AM »
Alan,

Thanks a lot for this. I had looked at the example but now it's starting to make more sense.

Still puzzled by the difference in visuals though, and have one machine where "errors on page" mean my site won't even work. If someone could shed some light on this it would be much appreciated.

All the best,

Simon

27
Web Server - Ask For Help / Newbie needs help - three questions
« on: November 12, 2007, 01:40:51 AM »
Hello all,

Struggling to get started with Web Server. Hope someone can help.

1. I have a browse that is working nicely. I would like to put one or more checkboxes on the page that will influence the browse filter. How do I do this?

2. Should I expect range limiting to work in conjunction with column sorting? It doesn't seem to.

3. Why would IE show my pages differently on different machines?  Some show the "round" style, some don't. One machine grumbles about errors on the page, for example "object expected".

Thanks for your patience.

Simon

Pages: 1 [2]