pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/msgpack-rpc/msgpack-rpc-python/commit/77d569cd23717b50c7c689a505047044ccd592de

media="all" rel="stylesheet" href="https://github.githubassets.com/assets/global-9c8f61f9f58ad7b2.css" /> Merge pull request #4 from ConConovaloff/protocol_selection · msgpack-rpc/msgpack-rpc-python@77d569c · GitHub
Skip to content

Commit 77d569c

Browse files
committed
Merge pull request #4 from ConConovaloff/protocol_selection
Opportunity to select the protocol in a Address
2 parents 2a5adce + ef29f62 commit 77d569c

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

msgpackrpc/address.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ class Address(object):
88
The class to represent the RPC address.
99
"""
1010

11-
def __init__(self, host, port):
11+
def __init__(self, host, port, family=socket.AF_UNSPEC):
1212
self._host = host
1313
self._port = port
14+
self._family = family
1415

1516
@property
1617
def host(self):
@@ -23,8 +24,8 @@ def port(self):
2324
def unpack(self):
2425
return (self._host, self._port)
2526

26-
def socket(self, family=socket.AF_UNSPEC):
27-
res = socket.getaddrinfo(self._host, self._port, family,
27+
def socket(self):
28+
res = socket.getaddrinfo(self._host, self._port, self._family,
2829
socket.SOCK_STREAM, 0, socket.AI_PASSIVE)[0]
2930
af, socktype, proto, canonname, sockaddr = res
3031
sock = socket.socket(af, socktype, proto)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy