mirror of
https://github.com/TheGreyDiamond/Enlight.git
synced 2025-07-19 05:03:49 +02:00
Documentation
This commit is contained in:
BIN
docs/build/doctrees/environment.pickle
vendored
BIN
docs/build/doctrees/environment.pickle
vendored
Binary file not shown.
BIN
docs/build/doctrees/index.doctree
vendored
BIN
docs/build/doctrees/index.doctree
vendored
Binary file not shown.
13
docs/build/html/genindex.html
vendored
13
docs/build/html/genindex.html
vendored
@ -70,6 +70,7 @@
|
|||||||
| <a href="#L"><strong>L</strong></a>
|
| <a href="#L"><strong>L</strong></a>
|
||||||
| <a href="#M"><strong>M</strong></a>
|
| <a href="#M"><strong>M</strong></a>
|
||||||
| <a href="#S"><strong>S</strong></a>
|
| <a href="#S"><strong>S</strong></a>
|
||||||
|
| <a href="#T"><strong>T</strong></a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<h2 id="C">C</h2>
|
<h2 id="C">C</h2>
|
||||||
@ -156,6 +157,18 @@
|
|||||||
</ul></td>
|
</ul></td>
|
||||||
</tr></table>
|
</tr></table>
|
||||||
|
|
||||||
|
<h2 id="T">T</h2>
|
||||||
|
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||||
|
<td style="width: 33%; vertical-align: top;"><ul>
|
||||||
|
<li><a href="index.html#mainCode.session.testModule">testModule() (in module mainCode.session)</a>
|
||||||
|
</li>
|
||||||
|
</ul></td>
|
||||||
|
<td style="width: 33%; vertical-align: top;"><ul>
|
||||||
|
<li><a href="index.html#mainCode.session.testOnlyServer">testOnlyServer() (in module mainCode.session)</a>
|
||||||
|
</li>
|
||||||
|
</ul></td>
|
||||||
|
</tr></table>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
14
docs/build/html/index.html
vendored
14
docs/build/html/index.html
vendored
@ -92,7 +92,7 @@
|
|||||||
<dt id="mainCode.session.enlightSession.getSessionMembers">
|
<dt id="mainCode.session.enlightSession.getSessionMembers">
|
||||||
<code class="descname">getSessionMembers</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#mainCode.session.enlightSession.getSessionMembers" title="Permalink to this definition">¶</a></dt>
|
<code class="descname">getSessionMembers</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#mainCode.session.enlightSession.getSessionMembers" title="Permalink to this definition">¶</a></dt>
|
||||||
<dd><p>Get all session members
|
<dd><p>Get all session members
|
||||||
:return: Returns a list of all members</p>
|
:list members: A list of all Session members</p>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
|
||||||
<dl class="method">
|
<dl class="method">
|
||||||
@ -173,6 +173,18 @@
|
|||||||
</table>
|
</table>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
|
||||||
|
<dl class="function">
|
||||||
|
<dt id="mainCode.session.testModule">
|
||||||
|
<code class="descclassname">mainCode.session.</code><code class="descname">testModule</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#mainCode.session.testModule" title="Permalink to this definition">¶</a></dt>
|
||||||
|
<dd><p>Tests the session server</p>
|
||||||
|
</dd></dl>
|
||||||
|
|
||||||
|
<dl class="function">
|
||||||
|
<dt id="mainCode.session.testOnlyServer">
|
||||||
|
<code class="descclassname">mainCode.session.</code><code class="descname">testOnlyServer</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#mainCode.session.testOnlyServer" title="Permalink to this definition">¶</a></dt>
|
||||||
|
<dd><p>Tests the session server without client</p>
|
||||||
|
</dd></dl>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="toctree-wrapper compound">
|
<div class="toctree-wrapper compound">
|
||||||
</div>
|
</div>
|
||||||
|
BIN
docs/build/html/objects.inv
vendored
BIN
docs/build/html/objects.inv
vendored
Binary file not shown.
2
docs/build/html/searchindex.js
vendored
2
docs/build/html/searchindex.js
vendored
@ -1 +1 @@
|
|||||||
Search.setIndex({docnames:["contents","index"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,"sphinx.ext.todo":1,sphinx:55},filenames:["contents.rst","index.rst"],objects:{"mainCode.session":{enlightSession:[1,1,1,""],get_local_ip:[1,3,1,""],get_random_alphanumeric_string:[1,3,1,""]},"mainCode.session.enlightSession":{clearAllSessions:[1,2,1,""],getSessionId:[1,2,1,""],getSessionMembers:[1,2,1,""],initConnection:[1,2,1,""],join:[1,2,1,""],leave:[1,2,1,""],lightSearcherDirectMain:[1,2,1,""],lightSearcherMain:[1,2,1,""],lighthouseMain:[1,2,1,""],serverMain:[1,2,1,""],stopSession:[1,2,1,""]},mainCode:{session:[1,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","method","Python method"],"3":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:class","2":"py:method","3":"py:function"},terms:{"class":1,"default":1,"int":1,"return":1,The:1,address:1,adress:1,all:1,alphanumer:1,between:1,bla:[],can:1,clear:1,clearallsess:1,client:1,comunc:1,connction:1,connect:1,dicoveri:1,direct:1,discoverd:1,discoveri:1,enlightsess:1,find:1,get:1,get_local_ip:1,get_random_alphanumeric_str:1,getsessionid:1,getsessionmemb:1,handler:1,host:1,index:1,initconnect:1,instanc:1,join:1,least:1,leav:1,length:1,lighthousemain:1,lightsearcherdirectmain:1,lightsearchermain:1,list:1,local:1,main:1,maincod:1,member:1,method:1,modul:1,name:1,need:1,noth:[],onli:[],option:[],output:1,page:1,passcod:1,password:[],pin:[],random:1,remot:1,role:1,search:1,second:1,secur:[],server:1,servermain:1,sessionid:1,set:[],start:1,stop:1,stopsess:1,string:1,support:1,take:1,test:[],thread:1,two:1,user:1},titles:["<no title>","Welcome to Enlight\u2019s documentation!"],titleterms:{document:1,enlight:1,indic:1,session:1,tabl:1,welcom:1}})
|
Search.setIndex({docnames:["contents","index"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,"sphinx.ext.todo":1,sphinx:55},filenames:["contents.rst","index.rst"],objects:{"mainCode.session":{enlightSession:[1,1,1,""],get_local_ip:[1,3,1,""],get_random_alphanumeric_string:[1,3,1,""],testModule:[1,3,1,""],testOnlyServer:[1,3,1,""]},"mainCode.session.enlightSession":{clearAllSessions:[1,2,1,""],getSessionId:[1,2,1,""],getSessionMembers:[1,2,1,""],initConnection:[1,2,1,""],join:[1,2,1,""],leave:[1,2,1,""],lightSearcherDirectMain:[1,2,1,""],lightSearcherMain:[1,2,1,""],lighthouseMain:[1,2,1,""],serverMain:[1,2,1,""],stopSession:[1,2,1,""]},mainCode:{session:[1,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","method","Python method"],"3":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:class","2":"py:method","3":"py:function"},terms:{"class":1,"default":1,"int":1,"return":1,The:1,address:1,adress:1,all:1,alphanumer:1,between:1,bla:[],can:1,clear:1,clearallsess:1,client:1,comunc:1,connction:1,connect:1,dicoveri:1,direct:1,discoverd:1,discoveri:1,enlightsess:1,find:1,get:1,get_local_ip:1,get_random_alphanumeric_str:1,getsessionid:1,getsessionmemb:1,handler:1,host:1,index:1,initconnect:1,instanc:1,join:1,least:1,leav:1,length:1,lighthousemain:1,lightsearcherdirectmain:1,lightsearchermain:1,list:1,local:1,main:1,maincod:1,member:1,method:1,modul:1,name:1,need:1,noth:[],onli:[],option:[],output:1,page:1,passcod:1,password:[],pin:[],random:1,remot:1,role:1,search:1,second:1,secur:[],server:1,servermain:1,sessionid:1,set:[],start:1,stop:1,stopsess:1,string:1,support:1,take:1,test:1,testmodul:1,testonlyserv:1,thread:1,two:1,user:1,without:1},titles:["<no title>","Welcome to Enlight\u2019s documentation!"],titleterms:{document:1,enlight:1,indic:1,session:1,tabl:1,welcom:1}})
|
@ -217,16 +217,20 @@ class enlightSession():
|
|||||||
def getSessionMembers(self):
|
def getSessionMembers(self):
|
||||||
"""
|
"""
|
||||||
Get all session members
|
Get all session members
|
||||||
:return: Returns a list of all members
|
:list members: A list of all Session members
|
||||||
"""
|
"""
|
||||||
return(self.members)
|
return(self.members)
|
||||||
|
|
||||||
def getSessionId(self):
|
def getSessionId(self):
|
||||||
''' Get the local session id '''
|
"""
|
||||||
|
Get the local session id
|
||||||
|
"""
|
||||||
return(self.sessionId)
|
return(self.sessionId)
|
||||||
|
|
||||||
def join(self, sessionID):
|
def join(self, sessionID):
|
||||||
''' Join a remote session '''
|
"""
|
||||||
|
Join a remote session
|
||||||
|
"""
|
||||||
if(not self.connected):
|
if(not self.connected):
|
||||||
try:
|
try:
|
||||||
data = self.allOnlineSessions[sessionID]
|
data = self.allOnlineSessions[sessionID]
|
||||||
@ -253,7 +257,9 @@ class enlightSession():
|
|||||||
return(-2)
|
return(-2)
|
||||||
|
|
||||||
def leave(self):
|
def leave(self):
|
||||||
''' Leaves the session, will take at least two seconds '''
|
"""
|
||||||
|
Leaves the session, will take at least two seconds
|
||||||
|
"""
|
||||||
if(self.__role__ == USER or self.__role__ == ADMIN):
|
if(self.__role__ == USER or self.__role__ == ADMIN):
|
||||||
## TODO: Send leave command to host
|
## TODO: Send leave command to host
|
||||||
self.__activ__ = False
|
self.__activ__ = False
|
||||||
@ -265,7 +271,9 @@ class enlightSession():
|
|||||||
logging.warning("leave was called, without the role set to USER or ADMIN. Did you mean .stopSession?")
|
logging.warning("leave was called, without the role set to USER or ADMIN. Did you mean .stopSession?")
|
||||||
|
|
||||||
def stopSession(self):
|
def stopSession(self):
|
||||||
''' Stops the session as a HOST '''
|
"""
|
||||||
|
Stops the session as a HOST
|
||||||
|
"""
|
||||||
if(self.__role__ == HOST):
|
if(self.__role__ == HOST):
|
||||||
self.allowJoin = False
|
self.allowJoin = False
|
||||||
self.__activ__ = False
|
self.__activ__ = False
|
||||||
@ -283,6 +291,9 @@ class enlightSession():
|
|||||||
|
|
||||||
|
|
||||||
def testModule():
|
def testModule():
|
||||||
|
"""
|
||||||
|
Tests the session server
|
||||||
|
"""
|
||||||
testSession = enlightSession("TestSession", role = HOST)
|
testSession = enlightSession("TestSession", role = HOST)
|
||||||
userSession = enlightSession("myLocalSession", role = USER)
|
userSession = enlightSession("myLocalSession", role = USER)
|
||||||
userSession.initConnection()
|
userSession.initConnection()
|
||||||
@ -294,6 +305,9 @@ def testModule():
|
|||||||
userSession.leave()
|
userSession.leave()
|
||||||
|
|
||||||
def testOnlyServer():
|
def testOnlyServer():
|
||||||
|
"""
|
||||||
|
Tests the session server without client
|
||||||
|
"""
|
||||||
testSession = enlightSession("TestSession", role = HOST)
|
testSession = enlightSession("TestSession", role = HOST)
|
||||||
testSession.initConnection()
|
testSession.initConnection()
|
||||||
time.sleep(30)
|
time.sleep(30)
|
||||||
|
Reference in New Issue
Block a user