Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F7170388
hello_connect.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
724 B
Referenced Files
None
Subscribers
None
hello_connect.py
View Options
# Copyright (C) 2008-2009 AG Projects. See LICENSE for details.
#
import
sys
from
eventlib
import
proc
from
msrplib.connect
import
ConnectorDirect
from
msrplib.protocol
import
URI
from
msrplib.trafficlog
import
Logger
from
msrplib.session
import
GreenMSRPSession
from
twisted.internet
import
reactor
# let eventlib know we want twisted-based hub
local_uri
=
URI
(
session_id
=
'client'
,
use_tls
=
False
)
remote_uri
=
URI
(
session_id
=
'server'
,
use_tls
=
False
)
connector
=
ConnectorDirect
(
logger
=
Logger
())
connector
.
prepare
(
local_uri
)
transport
=
connector
.
complete
([
remote_uri
])
session
=
GreenMSRPSession
(
transport
)
session
.
send_message
(
'hi'
,
'text/plain'
)
print
'received:
%s
'
%
session
.
receive_chunk
()
.
data
session
.
shutdown
()
File Metadata
Details
Attached
Mime Type
text/x-python
Expires
Tue, Nov 26, 4:34 AM (1 d, 16 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3413099
Default Alt Text
hello_connect.py (724 B)
Attached To
Mode
rPYMSRPLIB python3-msrplib
Attached
Detach File
Event Timeline
Log In to Comment