开发者

Vala : Networking with GIO / Socket example doesn't work

I'm trying to copy the "server example" from http://live.gnome.org/Vala/GIONetworkingSample.

But when I try to compile, I have the following error :

./src/server/Anais.vala:51.4-51.34: error: 2 missing arguments for `ssize_t GLib.OutputStream.write (void* buffer, size_t count, GLib.Cancellable? cancellable = null)'
            output.write( header.str.data );
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
./src/serve开发者_StackOverflowr/Anais.vala:52.4-52.31: error: 2 missing arguments for `ssize_t GLib.OutputStream.write (void* buffer, size_t count, GLib.Cancellable? cancellable = null)'
            output.write( content.data );
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Compilation failed: 2 error(s), 0 warning(s)
make: *** [build-server] Erreur 1

I tryed to understand, what the error message means. So I looked at the documentation : http://www.valadoc.org/references/gio-2.0/0.11.5/GLib.OutputStream.write.html

But as I'm not used to use glib and/or any library for client/server, I don't understand what I should do.

Could someone say to me how to use the OutputStream with Vala ?

NB : For information, I'm using valac 0.10.0


That example is listed as requiring Vala >= 0.11.0 -- the API is changed with every odd-numbered minor release (so 0.11.x is the development series leading to the stable 0.12.x), and it seems that the API has changed since 0.10.x

If you're on Linux, which distribution are you on? Most should have Vala 0.12.x if you have a recent enough release installed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜