XMMS2

src/lib/xmmsipc/testclient.c

Go to the documentation of this file.
00001 
00002 #include <glib.h>
00003 #include <sys/types.h>
00004 #include <sys/socket.h>
00005 #include <stdlib.h>
00006 
00007 #include "ipc_transport.h"
00008 
00009 int main ()
00010 {
00011 
00012     xmms_ipc_transport_t *transport;
00013     gint fd;
00014 
00015     transport = xmms_ipc_client_init ("unix:///tmp/xmms2.socket");
00016     if (!transport) {
00017         printf  ("Korv!\n");
00018         exit (-1);
00019     }
00020 
00021     fd = xmms_ipc_transport_fd_get (transport);
00022 
00023     xmms_ipc_transport_write (transport, "korv", 4);
00024 }