Gil

Switzerland

trustleap.ch

Trying, since 1979, to learn something every day.

Currently working on http://global-wan.ch/ (G-WAN-based Cloud services)

1d
answered How to reference Mono C# assemblies with GWAN C# servlets
1d
revised How to reference Mono C# assemblies with GWAN C# servlets
added the dll tag
1d
comment Gwan API wrappers and mono_add_internal_call
I certainly could not try from C# as I would need your code to do so. I am referring to the behavior for C, which applies to C#: the request is sliced and diced while parsed. As a consequence, if you wish to read the READ xbuffer directly then you have to read NULL-byte-separated parameters until you reach the end of the URI (which is marked by the protocol version "HTTP/1.x").
2d
comment Gwan API wrappers and mono_add_internal_call
I guess you are referring to URL parameters. They are still there but you need to read the buffer until you reach the end of the URI (with " HTTP/1.1 "), and skip the null characters used to separate each URL parameter.
2d
comment How to reference Mono C# assemblies with GWAN C# servlets
Since mono does not support the pragma keyword (nor any equivalent) we would have to use a comment at the top of the source code file to specify dependencies (like Google Go if I remember well). If you are interested in testing such a feature, contact the G-WAN team to get a test release.
Oct
20
comment Gwan API wrappers and mono_add_internal_call
The request context is (partially) cleared after the request has been processed and then totally cleared after a connection close (not while a servlet is executing). Check that you are accessing the 'right' information context by checking the value of the client socket from your servlet.
Oct
20
comment How to reference Mono C# assemblies with GWAN C# servlets
We don't modify anything either in the system or in the mono runtime settings.
Oct
18
comment Gwan API wrappers and mono_add_internal_call
Loading your persistent code from an ephemeral module. Thanks 'Pete' for the quick reply.
Oct
18
answered Gwan API wrappers and mono_add_internal_call
Oct
18
revised How to reference Mono C# assemblies with GWAN C# servlets
corrected (too long) code lines and URL
Oct
18
comment How to reference Mono C# assemblies with GWAN C# servlets
Using one of the G-WAN scripts at startup, you can load the library in the G-WAN memory-space, and then register its functions in the G-WAN API C# class exported in the /gwan/.../libraries/cs directory. Then your servlets will be able to use any extended C code you wrote, whether this is G-WAN C API function C# wrappers or your own C functions.
Oct
16
revised Gwan C#, how to get HTTP headers?
replied to question "EDIT"
Oct
14
comment GWAN servlet life cycle
"your servlet-wide variables [are] freed when [a] request ended" it only happens when the script has been edited and therefore automatically reloaded by G-WAN. The rest of the time, servlet variables are static (limited to the scope of the servlet), hence the need for "global" (sharable) pointers.
Oct
14
revised GWAN servlet life cycle
typos, grammar, formatting, missing tags...
Oct
13
comment Gwan C#, how to get HTTP headers?
Contact the G-WAN team for more options and a personalized answer.
Oct
13
comment Gwan C#, how to get HTTP headers?
G-WAN being a Web application server (with a rich API), people might not have felt the need to create a framework beyond what is already available. But there's certainly room for DB-agnostic wrappers, template libraries, etc. for people willing to use 'ready-to-wear' solutions, especially if you consider the flexibility of being able to use C/C++, C#/Java/Scala/PH7 native (and therefore superfast) scripts.
Oct
13
answered Gwan C#, how to get HTTP headers?
Oct
12
comment Keep MySQL connection in static variable in function (avoid global variables) in C
@Axan: a static variable will last as long as the code of the module remains in memory - that behavior is not unique for G-WAN. For complex cases, wake_up() lets you create a state machine which is immensely easier to deal with than spaghetti code... and makes it possible to really scale.
Oct
12
comment Keep MySQL connection in static variable in function (avoid global variables) in C
@solisoft: there are already 3 publicly available stream.c examples (4 for registered users) and a few for DBs too (in-memory SQLite is the one to use in most cases). Every user has different skills, ability to learn, and goals so there's no end to how many "how-to" examples one would have to write.
Oct
11
comment Keep MySQL connection in static variable in function (avoid global variables) in C
You are right. There's a lot that could be done to help users with more examples, and even open-source G-WAN applications. But doing this requires time and people, and these resources are currently allocated to our own G-WAN-based developments, which, by the way, are the only reason why G-WAN was developed in the first place.
1 2 3 4 5