Welcome, Guest. Please login or register. Did you miss your activation email?

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 - dwarfman78

Pages: 1 [2] 3 4 ... 6
16
SFML projects / Re: Heartbeat - a dynamic DNS client / server for GANDI DNS
« on: February 28, 2015, 04:16:57 pm »
Interesting to see some utility program. :)

The only part I don't really understand right now is the server (didn't look at the code so far). Why do you need that step? Wouldn't it be enough to talk to the DNS directly?

Indeed, the server part should be enough (with a few tweaks), you can find some python scripts or event a C version of an equivalent program on the internet.

However, i need to manage several dynamic public ip adresses (my dad's, my uncle's, a broke friend's which cannot offer himself a public domain name...). In a simple client/server configuration this would have meant  sharing my Gandi api key with them and i'm not found of that idea.

A python (or Java) based script was also out of the question because it needed to run on small devices like routers.

17
SFML projects / Heartbeat - a dynamic DNS client / server for GANDI DNS
« on: February 28, 2015, 09:51:30 am »
Hi guys,

I recently used sfml-network for a custom project :

What for

As my ISP does not provide me a static public ip address and because i was not entirely satisfied with dyndns.org or no-ip solutions, i designed my own "dynamic dns client/server" using sfml-network for client/server communications / thread management and Gandi XmlRpc API for updating my domain.

How it works

(click to show/hide)

1. A client sends periodically an UDP packet to the server, telling which subdomain to update.
2. The server calls GANDI xmlRpc API to check if the ip has changed and updates the subdomain if needed.
3. I can now send a dns lookup to retrieve my public IP...
4. ... And enjoy accessing my private network, even if my public ip has changed over time.

Why SFML

it proved itself quite easy to cross compile for my router and to use it for that purpose, so i guess it wasn't a bad choice.

Security

In order to deny the update of a subdomain from unwanted clients, i've implemented a basic password based SHA-256 security.

Improvments

Currently, the hash, for a given subdomain, client and password stays the same as long as the client ip stays the same, i should add a seed of some sort to make it changes over time, making it harder to find.

The password is the same for all clients and thus for all subdomains. I should add some configuration to allow a password for each subdomain.

Unit tests...

Sources

https://github.com/dwarfman78/heartbeat-client
https://github.com/dwarfman78/heartbeat-server

18
yeah i didn't want to be rogue.

However here it is : https://github.com/SFML/SFML/issues/798

19
General / Re: Cross compiling SFML 2.2 for openwrt using CMake
« on: February 12, 2015, 10:35:23 pm »
done.

http://en.sfml-dev.org/forums/index.php?topic=17492

Thank you again Laurent, my program is working like a charm, although it is not a classic "multimedia" project i'll probably make a topic in the project section to show how versatile sfml can be.

20
Hi,

Following those instructions : http://www.sfml-dev.org/contribute.php#requesting-features

and given this topic : http://en.sfml-dev.org/forums/index.php?topic=17489

I'm writing this request to allow the user the possibility to choose within cmake which modules to configure for compilation.

This feature is usefull if one is wanting to use a submodule on a targeted system that is not allowing another module to be compiled on/for.

In my case, i am using sfml-network (and its dependency sfml-system) only, indeed the target system is a openwrt router which cannot run any X11/opengl/whatever is needed by others sfml modules.

thanks for the feedback.

21
General / Re: Cross compiling SFML 2.2 for openwrt using CMake
« on: February 12, 2015, 08:31:53 pm »
Should i fill in a request to make it configurable ?

22
General / Re: Cross compiling SFML 2.2 for openwrt using CMake
« on: February 12, 2015, 08:29:37 pm »
Ok ... i modified CMakeLists.txt in src/SFML

# add the modules subdirectories
add_subdirectory(System)
if(SFML_OS_WINDOWS OR SFML_OS_ANDROID OR SFML_OS_IOS)
    add_subdirectory(Main)
endif()
#add_subdirectory(Window)
add_subdirectory(Network)
#add_subdirectory(Graphics)
if(NOT SFML_OS_IOS)
#    add_subdirectory(Audio)
endif()

Looks like you posted the answer while i was typing  ;)

then make sfml-network.

It seems to be working.

23
General / Re: Cross compiling SFML 2.2 for openwrt using CMake
« on: February 12, 2015, 08:14:26 pm »
Is there an easy way i could do it myself ?

Even an ugly way...

24
General / Re: Cross compiling SFML 2.2 for openwrt using CMake
« on: February 12, 2015, 06:27:39 pm »
EDIT :

Ok i had some cache problems, here is the message when i try to configure from SFML root directory :

CMake Error at /usr/share/cmake-2.8/Modules/FindX11.cmake:427 (message):
  Could not find X11

which makes sense ... but i do not need X11 for the Network module right ?

25
General / Re: Cross compiling SFML 2.2 for openwrt using CMake
« on: February 12, 2015, 06:12:27 pm »
Hi again,

i've sucessfully compiled an helloWorld example with CMake and made it run on my router.

Now i'm back with SFML.

CMake Error at CMakeLists.txt:54 (sfml_add_library):
  Unknown CMake command "sfml_add_library".

26
General / Re: Cross compiling SFML 2.2 for openwrt using CMake
« on: February 12, 2015, 09:36:16 am »
Thanks for the answer, i'll do that and come back later if i have more SFML specific errors coming out.

27
General / Cross compiling SFML 2.2 for openwrt using CMake
« on: February 12, 2015, 08:23:14 am »
Hi guys,

i'd like to use SFML Network module with my router which runs under openwrt.

I have a very limited knowledge of cross compiling, anyone would care to help me to cross compile the network module for this operating system ? (maybe on irc)

So far i've an error with CMake : "mips-openwrt-linux-uclibc-gcc is not able to compile a simple test program".

thanks.

28
SFML projects / Re: SFBL (SFML Box2D Light)
« on: January 27, 2015, 06:25:05 pm »
As far as i have experimented, Box2D compilation works with CMake if you unselect examples.

29
SFML projects / Re: PXL8
« on: July 19, 2014, 07:50:27 am »
i did use this shader for my game menu (on the background) :



All sources are available at my github here : https://github.com/dwarfman78?tab=repositories

30
I find this page quite interesting : http://chaiscript.com/coding_standards.html

What comes to my mind at the moment :

- Avoid pointers and new keyword, i know new is the only way to instantiate a class in java but simply do not use it, use make_shared instead (or unique_ptr when it is deserved).

- Prefer initializing member data with member initializer list instead of inside the body of the constructor.

- When passing or returning complex types, you may want to use references (or const references depending of the context), it depends of what you want to achieve, but passing arguments by copy might be costly.

- There's also a bunch of stuff you should learn about copy constructor and = operator when binary copy is not wanted.

- Templating mecanism is different (java templates are solved at runtime, on the contrary c++ templates are solved at compile time)

that's all for the moment, but i'm sure you can find many books like "learning c++ for java programmers" or "thinking in c++".

I'm afraid there is no direct highway to learn c++, it takes time and practice.

Pages: 1 [2] 3 4 ... 6