mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
37_fakeRoku.pm: added httpPort attribute
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@11190 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
2df9f434fc
commit
21c5aefcd8
@ -40,7 +40,7 @@ fakeRoku_Initialize($)
|
|||||||
#$hash->{SetFn} = "fakeRoku_Set";
|
#$hash->{SetFn} = "fakeRoku_Set";
|
||||||
#$hash->{GetFn} = "fakeRoku_Get";
|
#$hash->{GetFn} = "fakeRoku_Get";
|
||||||
$hash->{AttrFn} = "fakeRoku_Attr";
|
$hash->{AttrFn} = "fakeRoku_Attr";
|
||||||
$hash->{AttrList} = "disable:1,0";
|
$hash->{AttrList} = "disable:1,0 httpPort";
|
||||||
}
|
}
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
@ -224,7 +224,8 @@ fakeRoku_startListener($)
|
|||||||
|
|
||||||
fakeRoku_stopListener($hash);
|
fakeRoku_stopListener($hash);
|
||||||
|
|
||||||
if( my $socket = IO::Socket::INET->new(LocalPort=>0, Listen=>10, Blocking=>0, ReuseAddr=>1, ReusePort=>defined(&ReusePort)?1:0) ) {
|
my $port = AttrVal($name, 'httpPort', 0);
|
||||||
|
if( my $socket = IO::Socket::INET->new(LocalPort=>$port, Listen=>10, Blocking=>0, ReuseAddr=>1, ReusePort=>defined(&ReusePort)?1:0) ) {
|
||||||
|
|
||||||
my $chash = fakeRoku_newChash( $hash, $socket, {NAME=>"$name:listener", STATE=>'accepting'} );
|
my $chash = fakeRoku_newChash( $hash, $socket, {NAME=>"$name:listener", STATE=>'accepting'} );
|
||||||
|
|
||||||
@ -761,7 +762,8 @@ Log 1, "!!!!!!!!!!";
|
|||||||
|
|
||||||
<a name="fakeRoku_Attr"></a>
|
<a name="fakeRoku_Attr"></a>
|
||||||
<b>Attr</b>
|
<b>Attr</b>
|
||||||
<ul>none
|
<ul>
|
||||||
|
<li>httpPort</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</ul><br>
|
</ul><br>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user