I think there is a bug in SlimTray regarding whenusing ports other than
9000 but it may be unrelated to the problem in hand.  

Although Slimtray checks user prefs for the socket number  - Slimtray
will always try to connect to  9000 to see if Slimserver is listening. 
This may have desired result if the app on port 9000 is not Slimserver.

The code uses $rport to open the port number but if successful returns
$httPort which has the value from user prefs which is not the port no.
tested.


Code:
--------------------
    
  my $raddr = '127.0.0.1';
  my $rport = 9000;
  my $proto = (getprotobyname('tcp'))[2];
  my $pname = (getprotobynumber($proto))[0];
  my $sock  = Symbol::gensym();
  my $iaddr = inet_aton($raddr);
  my $paddr = sockaddr_in($rport, $iaddr);
  socket($sock, PF_INET, SOCK_STREAM, $proto);
  connect($sock, $paddr);
  if (defined $sock && fileno($sock)) {
        close($sock);
        return $httpPort;
  }
  return 0;
  
--------------------


-- 
bpa
------------------------------------------------------------------------
bpa's Profile: http://forums.slimdevices.com/member.php?userid=1806
View this thread: http://forums.slimdevices.com/showthread.php?t=32257

_______________________________________________
discuss mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/discuss

Reply via email to