[Kde-games-devel] setDiscoveryInfo ?

Kleag kleag at free.fr
Fri Aug 19 14:28:13 CEST 2005


Le Vendredi 19 Août 2005 13:42, Jakub Stachowski a écrit :
> Dnia czwartek, 18 sierpnia 2005 23:27, Kleag napisał:
> > Hello,
> >
> > What is the goal of the (undocumented) KGameNetwork::setDiscoveryInfo
> > function introduced in kde 3.4 ?
>
> It is used to 'announce' game on LAN so user that wants to join it does not
> need to know IP - client can discover all running ksirk servers and present
> them in combobox or something like that.
> Discovery is done using DNSSD::ServiceBrowser (see kbattleship for example)
Great, I will look at it.

>
> Something like that should be correct:
>
> #if KDE_IS_VERSION(3,4,0)
> setDiscoveryInfo("_ksirk._tcp");
> #endif
>
> > I tried no to use it and it works even better: a 5 to 10 seconds freeze
> > disappear...
>
> Could you send me strace output with timestamps?
With the code you give and the command line below, the freeze is still there. 
I attach the result.
strace -o ksirk.strace -c -r -f -F -t -tt ksirk 

Is it the data you expected ?


Kleag
-- 
KsirK - a turn-based strategy game for KDE
http://gna.org/projects/ksirk

KGraphViewer - a GraphViz dot graphs viewer
http://gna.org/projects/kgraphviewer
-------------- next part --------------
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 32.91    0.134623         131      1029           write
 13.81    0.056486          16      3480        80 read
 10.86    0.044419          66       672           select
  9.10    0.037239          14      2726           gettimeofday
  7.07    0.028920          20      1477      1127 access
  6.40    0.026187          11      2483           ioctl
  5.44    0.022236          96       232           writev
  3.27    0.013386          19       721       405 open
  2.75    0.011266          18       626       145 stat64
  1.60    0.006525          10       624           fstat64
  1.25    0.005132          22       236           munmap
  0.88    0.003619          15       246           mmap2
  0.83    0.003380          10       326           close
  0.82    0.003338          15       223        17 lstat64
  0.58    0.002357          18       133           old_mmap
  0.38    0.001567          21        73           readv
  0.27    0.001117           9       123           fcntl64
  0.27    0.001109          74        15        12 connect
  0.17    0.000677         113         6           futex
  0.16    0.000642          21        30           brk
  0.14    0.000580          10        59           rt_sigaction
  0.12    0.000499         100         5           rename
  0.10    0.000419          10        44           _llseek
  0.10    0.000406          37        11         1 unlink
  0.10    0.000401         401         1           bind
  0.09    0.000348           9        40           rt_sigprocmask
  0.07    0.000304          19        16           getdents64
  0.06    0.000262          10        26           uname
  0.06    0.000247          49         5           link
  0.06    0.000241          15        16           fchmod
  0.06    0.000228          18        13           getgid32
  0.04    0.000150          21         7           socket
  0.03    0.000121           6        20           getuid32
  0.03    0.000111           7        16           umask
  0.02    0.000098          12         8           fchown32
  0.02    0.000083          21         4           mprotect
  0.02    0.000063          63         1           readlink
  0.01    0.000051          26         2           pipe
  0.01    0.000049          49         1           listen
  0.01    0.000041          14         3           time
  0.01    0.000029          10         3           geteuid32
  0.01    0.000028          14         2           getcwd
  0.00    0.000018           9         2           getrlimit
  0.00    0.000011          11         1           _sysctl
  0.00    0.000009           1         9           nanosleep
  0.00    0.000008           8         1           shutdown
  0.00    0.000008           8         1           getsockopt
  0.00    0.000006           6         1           set_thread_area
  0.00    0.000006           3         2           getsockname
  0.00    0.000006           3         2         2 getpeername
  0.00    0.000005           5         1           getegid32
  0.00    0.000004           1         4           fdatasync
  0.00    0.000004           4         1           set_tid_address
  0.00    0.000003           3         1           setsockopt
------ ----------- ----------- --------- --------- ----------------
100.00    0.409072                 15810      1789 total


More information about the kde-games-devel mailing list