Il giorno giovedì 26 aprile 2012 21:54:40 UTC+2, Jens Thoms Toerring ha scritto:
> pozz
> wrote:
> > I'll start a new application in a short time and I'm wondering if C
> > language is good enough for that.
>
> > The application will be simple: it should implement some TCP/UDP
> > protocols (like TFTP, BOOTP,...) with a simple GUI. It will run on
> > Windows platforms, but the possibility to run it on Linux would be nice.
>
> > Is C language suitable for this kind of applications? Which kind of
> > cross-platform libraries should I use to manage IP protocols and simple
> > GUIs? Could python or other high-level (script) languages be a better
> > choice?
>
> Of course, all this can be done in C (most scripting languages
> are actually implemented in C, so everything you can do in
> those languages can obviously be done in C).
Oh, yes. I know C is powerful enough to manage comple network
protocols and beautiful graphical interfaces. The questions was
related to a simple application where I don't want to loose
too much time to find a suitable network and graphic library and
fine tune them. C can do anything at the cost of greater complexity.
I'm asking if a high-level scripting language can be more effective
for simple tasks and applications.
> But note that C
> has no "native" support for networking or graphics, thus the
> need for additional (cross-platform) libraries (unless you're
> keen to re-invent the wheel;-).
Absolutely no, I want to reuse existing libraries.
> For TFTP and other protocols
> libcurl seems to be a candidate to take a look at. I don't
> know about BOOTP (wasn't that obsoleted by DHCP?).
I have to implement a sub-set of DHCP protocol, similar to the
original BOOTP. It's for an Ethernet firmware upgrade for
and embedded gadget.
> For gra-
> phics the only cross-platform library for C I know about is
> GTK+ (but I never used it) - most other seem to require C++.
>
> If using Python or some other scripting language would be pre-
> ferable depends on what you want to do there, if you need max-
> imum performance, and if you feel comfortable with that lan-
> guage. Perhaps it might be a good idea to start with a scrip-
> ting language and see if it does ok, otherwise you can still
> re-implement the stuff in C, drawing on the experiences you
> made.
Ok, thank you for your suggestions.