GLib.Socket implements GLib.DatagramBased, hence calling
Socket.create_source() results in a C call to
g_socket_datagram_based_create_source() insted of
g_socket_create_source() as one my expect. The former works only for
datagram based sockets (as implemented in gio/gsocket.c), hence
Socket.create_source() for TCP socket will always return null. To
workaround this, export g_socket_create_source() as
Socket.create_socket_source() method.
The change is expected to be a part of vala 0.34 release.