Hi,

I'd like to get a simple "hello world" example working as a UDP server.  I
could really use a little help.

I am beginning with the examples/simple_logger.py sample code.
I have a very simple client running in a loop which sends a UDP message to
the server every few seconds.


...My code looks like this:

import uwsgi

print('\n\n --- This prints just fine ---\n\n')

def app(ip, port, message):
    print('\n\n --- Wish this would print ---\n\n')
    return True

uwsgi.udp_callable = app


...My ini file looks like this:

[uwsgi]
plugins = python
socket = /tmp/metre.sock
no-default-app = true
module = example.app:app
udp = :5000
callable = app
show-config = true
vacuum = true


...I am running uwsgi version 2.0.1 with this command:
$ uwsgi --ini example.ini


The server launches and runs without errors.  I can see the print statement
"This prints just fine", and a message "WSGI callable selected", so the
python module is at least being loaded.
 
I can see the messages sent from the client written to std out by the server
(although they are not printed by my code).

What I am *unable* to do is get the "app" function called.

Could anyone offer a suggestion what I might try?

Thank you very much.

_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to