OSC.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:game_engine_evertims 作者: EVERTims 项目源码 文件源码
def __init__(self, server=None):
        """Construct an OSC Client.
        When the 'address' argument is given this client is connected to a specific remote server.
          - address ((host, port) tuple): the address of the remote server to send all messages to
        Otherwise it acts as a generic client:
          If address == 'None', the client doesn't connect to a specific remote server,
          and the remote address must be supplied when calling sendto()
          - server: Local OSCServer-instance this client will use the socket of for transmissions.
          If none is supplied, a socket will be created.
        """
        self.socket = None

        if server == None:
            self.socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
            self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_SNDBUF, self.sndbuf_size)
            self._fd = self.socket.fileno()

            self.server = None
        else:
            self.setServer(server)

        self.client_address = None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号