- Username, Passwoord optioneel
- Buffer size recv zodat het zonder SSL werkt.
This commit is contained in:
11
lmwsip.py
11
lmwsip.py
@@ -22,12 +22,13 @@ Support for:
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, user, password, host="sip-lmw.rws.nl", port=443,
|
def __init__(self, user=None, password=None,
|
||||||
|
host="sip-lmw.rws.nl", port=443,
|
||||||
meetnet="LMW", ssl = True, check_ssl = True):
|
meetnet="LMW", ssl = True, check_ssl = True):
|
||||||
"""LmwSip(user, password, [host], [port], [meetnet], [ssl], [check_ssl])
|
"""LmwSip(user, password, [host], [port], [meetnet], [ssl], [check_ssl])
|
||||||
|
|
||||||
user: Lmw user name
|
user(optinal): Lmw user name
|
||||||
password: Lmw password
|
password(optional): Lmw password
|
||||||
host(optional): Default sip-lmw.rws.nl
|
host(optional): Default sip-lmw.rws.nl
|
||||||
port(optional): Default 443
|
port(optional): Default 443
|
||||||
meetnet(optional): Default LMW
|
meetnet(optional): Default LMW
|
||||||
@@ -43,7 +44,9 @@ Opens the connection and logs in
|
|||||||
self.meetnet = meetnet
|
self.meetnet = meetnet
|
||||||
self.ssl = ssl
|
self.ssl = ssl
|
||||||
self.check_ssl = check_ssl
|
self.check_ssl = check_ssl
|
||||||
|
if (self.host != None):
|
||||||
self.connect()
|
self.connect()
|
||||||
|
if (self.user != None):
|
||||||
self.login()
|
self.login()
|
||||||
|
|
||||||
def lasttime(self, parameter):
|
def lasttime(self, parameter):
|
||||||
@@ -104,7 +107,7 @@ send a sip command to the server
|
|||||||
|
|
||||||
recieve a answer from the sip server
|
recieve a answer from the sip server
|
||||||
"""
|
"""
|
||||||
return(self._socket.recv())
|
return(self._socket.recv(4096))
|
||||||
|
|
||||||
def login(self):
|
def login(self):
|
||||||
"""login()
|
"""login()
|
||||||
|
Reference in New Issue
Block a user