The Go programming language
Go Assembly HTML C Shell Perl
Pull request Compare This branch is 19 commits ahead, 1860 commits behind golang:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

SCTP in Go

This branch has SCTP functionality added to the network library. I will try and keep this branch up to date with the master branch of the official Go repository

Go wild!

Needless to so say, SCTP in Go is experimental and should be used with caution.

Supported platforms

For now this will only work on FreeBSD 11 and OSX EL Captain.

FreeBSD comes with native SCTP support. On Mac OSX follow the instructions in the official SCTP repository to install the driver.

MacOS Sierra is not supported since there are no SCTP drivers available yet.

Example server:

package main
import (

func main() {

    saddr := ""
    addr, err := net.ResolveSCTPAddr("sctp", saddr)
    if err != nil {

    conn, err := net.DialSCTP("sctp", nil, addr)
    if err != nil {
        println("Error listening " + err.Error())

    defer conn.Close()

    var message = "hello"
    bmessage := []byte(message)

    _, err = conn.WriteTo(bmessage, addr)
    if err != nil {
        log.Printf("WriteTo error: %v", err)


Build instructions for SCTP in Go

These commands are based on the instructions here.

$ git clone
    $ export GOROOT=/usr/local/go 
$ cd go-sctp
$ cd src
$ ./all.bash

To run the go command replace symbolic link /usr/local/bin/go and point it to go-sctp/bin/go:

    $ rm /usr/local/bin/go
    $ ln -s /pathtorepo/go-sctp/bin/go /usr/local/bin/go

Test SCTP in Go

The SCTP examples repository contains working examples and instructions to test SCTP. It has TCP examples to compare with.

Have fun!

Any questions drop me an email 'ovanac01 at' or tweet #cyberroadie

Olivier Van Acker

Below this line is the official Go README documentation

The Go Programming Language

Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.

Gopher image

For documentation about how to install and use Go, visit or load doc/install-source.html in your web browser.

Our canonical Git repository is located at There is a mirror of the repository at

Go is the work of hundreds of contributors. We appreciate your help!

To contribute, please read the contribution guidelines:

Note that we do not accept pull requests and that we use the issue tracker for bug reports and proposals only. Please ask questions on or!forum/golang-nuts.

Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.

Binary Distribution Notes

If you have just untarred a binary Go distribution, you need to set the environment variable $GOROOT to the full path of the go directory (the one containing this file). You can omit the variable if you unpack it into /usr/local/go, or if you rebuild from sources by running all.bash (see doc/install-source.html). You should also add the Go binary directory $GOROOT/bin to your shell's path.

For example, if you extracted the tar file into $HOME/go, you might put the following in your .profile:

export GOROOT=$HOME/go
export PATH=$PATH:$GOROOT/bin

See or doc/install.html for more details.