Is there any good examples or tutorial about epoll UDP? - epoll

I have been working with linux server using epoll and almost finished it.
And I realized that clients will send packets using udp :(
Could you please provide me any good tutorials or example using epoll udp?
Thanks in advance.

The man pages were helpful for me. There's also a good code example in there.
http://kernel.org/doc/man-pages/online/pages/man4/epoll.4.html
http://kernel.org/doc/man-pages/online/pages/man2/epoll_create1.2.html
If you're really insisting on tutorial, I'd recommend:
https://banu.com/2011/06/how-to-use-epoll-complete-example/
https://github.com/felipecruz/rio/blob/master/src/network.c

Related

How to implement Rabbitmq client for NodeMCU in Lua

Can anybody help me in implementing rabbitmq client for ESP32(NodeMCU Lua)..?
Actually I'm having little knowledge on MQTT I've implemented basic publish and subscribe with Mosquitto broker on ESP32(NodeMCU Lua) which is already available in NodeMCU documentation.
Now I want to work with Rabbitmq but I don't know how to work with that, where to start and there's no much available resources for guiding how to use rabbitmq in NodeMCU Lua and any efforts towards this will be appreciated.
I'm having doubts like can I able to implement with the existing API's (module) provided by NodeMCU (https://nodemcu.readthedocs.io/en/dev-esp32/modules/mqtt) or need to implement a dedicated client for Rabbitmq please help me to get solution for this maze and also please provide me any sources.
Abhi - if this is still an issue for you then perhaps I can help:
you do NOT need any RabbitMQ plugins or other code on the NodeMCU device.
you DO need your NodeMCU firmware compiled to include the MQTT module.
you DO need to enable the rabbitmq_mqtt plugin on your server.
For help with NodeMCU stuff look at https://nodemcu.readthedocs.io/en/release/modules/mqtt/
And for the RabbitMQ plugin: https://www.rabbitmq.com/mqtt.html#enabling-plugin
Cheers
Sean

FreeRTOS on STM32F407-Discovery

I downloaded FreeRTOS port for STM32F4-Discovery from https://github.com/wangyeee/STM32F4-FreeRTOS and I managed to compile it and flash it to the board, but I don't know what to do next. I would like to verify that it is working.
I tried to use debugger and I saw that after reset the program is in function deregister_tm_clones and the board does nothing.
What to do next?
Thanks
Vaclav
You have the code, so can look to see what it is doing. Alternatively you can ask the author of the code by contacting them via github - if you do that they will see the question, if you post a question about there code here then it is unlikely they will see it.
Alternatively there are lots of resources available on the web to help you. For example there is an (old) documented port to that chip on the FreeRTOS website here: https://www.freertos.org/FreeRTOS-for-STM32F4xx-Cortex-M4F-IAR.html ST's STM32Cube software will create FreeRTOS projects for you http://www.st.com/en/development-tools/stm32cubemx.html - and if you just want to learn FreeRTOS you can download a free book here https://www.freertos.org/Documentation/RTOS_book.html

Sample program for GDbus signals

I am new to GDbus programming. I need to implement a simple Dbus send-receive message (Signals) using Dbus Glib. I tried to google some sample programs, but couldn't find.
Can anyone post any such sample program or point me to some sample program tutorial?
Thanks in advance...
Thanks,
SB
I think following these steps could help:
Read the wikipedia article on DBus to get a good understanding
of the DBus architecture.
Follow it up with these slides(atleast the first few slides about the architecture). Here is the original GNOME conference video where these slides were used.
Look at a simple hello world program using GDBus here, or for something more detailed, see my example code here. I've got a detailed README explaining the details.
This should help.
:)
I've found this tutorial helpful. It starts off explaining DBus in general and continues with showing implementation examples using gdbus.
I found a book that talks about GDBus, gdbus-code gen, GVariant and all the relevant bits and pieces:
http://maemo.org/maemo_training_material/maemo4.x/html/maemo_Platform_Development_Chinook/
Simple server/client example:
https://github.com/chiehmin/gdbus_test
As outlined above, I would start with the wiki article to understand the concepts:
https://en.wikipedia.org/wiki/D-Bus

Implementing RabbitMQ in BlackBerry

I need to use RabbitMQ in one of my projects. On googling I got to know that the library for RabbitMQ is not compatible with BlackBerry. In some posts in StackOverFlow itself someone has suggested to use STOMP protocol in J2ME as RabbitMQ supports STOMP upon adding some plugins. But I couldn't find a library for STOMP in J2ME as well.
Has anyone used RabbitMQ in Blackberry? Any help will be much appreciated.
Thank you very much in advance.
I converted the Gozirra Stomp Java Client code for J2ME you can download it from
https://github.com/rifatdover/RabbitMQStompConnectorForBlackberry
Build a more traditional web interface for RabbitMQ, then have the BlackBerry client code talk to the web interface.

Indy documentation

I think to start using Indy to replace the old and deprecated TSocket delphi component.
Indy seems to be a very rich collection of components but I have found no good documentation about it.
The only docs I found are both old or empty template without usefull info .
Can someone tell me where can I found some good documentation abou Indy 10 ?
Regards, Enzo
the documentation for Indy is all here: http://www.indyproject.org/sockets/docs/index.en.aspx
in some cases it's less than detailed enough, but developers of indy do answer questions on stackoverflow ;-)
I tried this myself some time ago - I still use TServerSocket and TClientSocket although you have to install them yourself. I struggled to find documentation also, but I did come across a lot of info for Indy sockets (enough to convince me to stick with TSockets anyway) on the embarcadero developer forums when considering the same path that you are now intending to take (I am assuming you have access to these if you are using c++Builder-XE like myself, so maybe try there if you have no luck here).

Resources