go-osc

Open Sound Control (OSC) library for Golang. Implemented in pure Go.

Github星跟蹤圖

GoOSC

Build Status GoDoc Coverage Status
Go Report Card

Open Sound Control (OSC) library for Golang. Implemented in pure Go.

Features

  • OSC Bundles, including timetags
  • OSC Messages
  • OSC Client
  • OSC Server
  • Supports the following OSC argument types:
    • 'i' (Int32)
    • 'f' (Float32)
    • 's' (string)
    • 'b' (blob / binary data)
    • 'h' (Int64)
    • 't' (OSC timetag)
    • 'd' (Double/int64)
    • 'T' (True)
    • 'F' (False)
    • 'N' (Nil)
  • Support for OSC address pattern including '*', '?', '{,}' and '[]' wildcards

Install

go get github.com/hypebeast/go-osc

Usage

Client

import "github.com/hypebeast/go-osc/osc"

func main() {
    client := osc.NewClient("localhost", 8765)
    msg := osc.NewMessage("/osc/address")
    msg.Append(int32(111))
    msg.Append(true)
    msg.Append("hello")
    client.Send(msg)
}

Server

package main

import "github.com/hypebeast/go-osc/osc"

func main() {
  addr := "127.0.0.1:8765"
  server := &osc.Server{Addr: addr}

  server.Handle("/message/address", func(msg *osc.Message) {
    osc.PrintMessage(msg)
  })

  server.ListenAndServe()
}

Tests

go test

主要指標

概覽
名稱與所有者hypebeast/go-osc
主編程語言Go
編程語言Go (語言數: 2)
平台
許可證MIT License
所有者活动
創建於2013-08-26 14:10:42
推送於2023-01-15 23:19:26
最后一次提交2022-03-09 00:43:00
發布數0
用户参与
星數213
關注者數11
派生數51
提交數207
已啟用問題?
問題數24
打開的問題數14
拉請求數29
打開的拉請求數5
關閉的拉請求數7
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?