World: r3wp
[!Uniserve] Creating Uniserve processes
older newer | first last |
Terry 4-Feb-2006 [257x7] | Again, this is a service.. on-received: func [data][ raw-input: copy to-string data if raw-input = "test" [print "works"] ] But if I put the if raw-input = "test" [print "works"] line in a seperate file.. ie process.r ,and do it like this.. on-received: func [data][ raw-input: copy to-string data do %./process.r ] It doesn't work.. In fact, it seems difficult to put global functions that are truly global, anywhere. |
Probably on the same note, it's hard to encap Uniserve, given the folder structure and the way services are loaded etc. | |
The way Uniserve sits now makes it more extensible if you want to easily add protocols, services etc., but the trade-off is complexity trying to do other things. | |
Im sure it's fine.. just trying to grok it. | |
I'm finding it difficult to follow what's happening. | |
But if that's what it takes to have a single server handling everything from POP to HTTP to direct TCP, then so be it. | |
Looking forward to what's coming down the pipe.. what features/changes are you adding? | |
Graham 4-Feb-2006 [264] | try do/args ... |
Terry 4-Feb-2006 [265x2] | From the Uniserve docs.. "Your UniServe installation is OK, so you can now build your next killer-app ! ;-)" I'm on it ;) |
do/args ? how would that work? | |
Graham 4-Feb-2006 [267x3] | do/args %./process.r raw-input |
and change your process.r script to look at the arguments. | |
if process.r doesn't change, you shouldn't do it anyway. | |
Terry 4-Feb-2006 [270] | Seems it relates to this part (from the docs) Put all the service related code in the service definition. You can include external libraries of code if needed. Everything that's not inside the service definition block will be globally BIND-ed. |
Graham 4-Feb-2006 [271] | #include external libraries of code if needed |
Terry 4-Feb-2006 [272x5] | Ok.. i can add external libraries.. just after the install-service [ .. BUT.. to write back to the client, you use "write-client" so if in my processing, but that function wont work.. it's a catch 22. |
So simply put.. how can I process an incoming message using an external page of code, and be able to respond from that page? I may need to create an "OUTPUT" value (the response) and then use the 'write-client' function once Im back in the service ON-RECEIVED function? | |
That last bit works.. seems the global context functions, such as 'write-client' dont pass to the script that is being DOne | |
Ok.. so now I can run the external script by placing waiting till i finsh the external, and get back to the 'on-received' function... but I have a number of functions that I use to process my external script.. Do I need to load those functions with every on-received event??? | |
For example: If I place this function just after the "install-service [ " testFunk: func [it][print it] and if at anytime i DO an external script that uses that function, it doesn't work | |
Volker 4-Feb-2006 [277x2] | Not used to uniserv much, but usually such things use contexts for services. so install-service [testFunk: func [it][print it] should be similar to make object![ testFunk: func [it][print it] |
you could try install-service [ set 'testFunk func [it][print it] if that is the problem. then testFunk should be globally. | |
Terry 4-Feb-2006 [279x10] | Hmm, that's it. |
I see here a new law... the query is exponentially greater than the answer. | |
Also, it seems that this stuff is handled by a seperate module (for background processing)? | |
Nenad, do you have an y Task-master examples? | |
Another question.. where could I put a piece of code to handle unknown (aka unserviced) ports? Should be able to create a catch-all or a port-analyzer etc... check for scanning or other security issues. | |
Graham, your http://www.compkarori.com/vanilla/display/Smtpd.rdoesn't appear to be working? | |
actually, working now.. Vanilla is sooo slow. | |
graham, what do I need to do with your smtp service to allow a localhost domain.. getting this.. "waiting 20s as {MYLAPTOPNAME} fails domain rule" | |
it then dies | |
with.. "Server error: tcp 553 sorry, that domain is not in my list of allowed rcpthosts" | |
Terry 5-Feb-2006 [289x5] | Nenad.. for some reason, Uniserve seems to be struggling with inlcludes.. like CSS files have you noticed this? |
Where ... <link rel="stylesheet" href="the.css" type="text/css" /> works anywhere else, it's not with Uniserve?? | |
(hte httpd.r service, that is) | |
I found it, the paths aren't relative from the page, but from the wwwroot | |
Althogh.. it struggling with j<avascript src="" .. > files in the header? If I paste the code, it worsk, but if I SRC= .. it doesn't.. no matter what path I use. | |
Volker 5-Feb-2006 [294] | Mime-tpyes? (just a thought) |
Terry 5-Feb-2006 [295x3] | mime types seem ok |
I did add a.. text/javascript js | |
Here's an example.. prototype ( a javascript framework uses prototype.js and that file uses includes to add other JS files.. like this.. <%= include 'ajax.js', 'dom.js', 'form.js', 'event.js', 'position.js' %> the problem seems to be here somewhere? | |
Thør 4-Apr-2006 [298] | manual resync... |
Terry 10-Apr-2006 [299] | Nenad, your softinnov.org site has been offline for awhile now. How's the progress on Cheyenne going? |
DideC 10-Apr-2006 [300] | Offline or outdated? http://www.softinnov.orgworks fine here |
Terry 10-Apr-2006 [301] | It was offline.. it's back, and updated too. |
Terry 11-Apr-2006 [302] | (or not) |
Dockimbel 8-May-2006 [303x2] | There were some OS upgrades on this server in mid-april that required to put down the web site. |
There's currently some issues on the domain name softinnov.org, please use http://softinnov.netfor now to access our web site. | |
Philippe 10-May-2006 [305] | Doc, when will you release a beta of Cheyenne and a new version of Uniserve ? |
Terry 11-May-2006 [306] | I second that request |
older newer | first last |