Skip to content

Fusion is a custom network framing protocol with a small and lightweight header.

License

Notifications You must be signed in to change notification settings

Vinz1911/fusion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fusion

Fusion is a library which implements the Fusion Framing Protocol (FFP). The Fusion Framing Protocol (FFP) is proprietary networking protocol which uses a small and lightweight header with a performance as fast as raw tcp performance. Built directly on top of Go's net.Listener with support for plain tcp and tls encrypted connections. The implementation for the Client is FusionKit written in swift on top of Network.framework to ensure maximum performance.

License:

License

Golang Version:

Golang 1.16 Golang 1.16

Installation:

Go Modules

Go Modules. Just add this repo to your go.sum file.

Import:

// import the framework
import "github.com/Vinz1911/fusion/network"

// create a new connection listener
listener := network.Listener{}

// ...

Callback:

// create a new connection listener
listener := network.Listener{}

// listener is ready
listener.Ready = func(socket net.Conn) { }

// listener received message from a connection
listener.Message = func(conn net.Conn, binary []byte, opcode uint8) {
	// message is text based
    if opcode == network.TextMessage { println(string(binary)) }
    // message is binary based
    if binary == network.BinaryMessage { println(len(binary)) }
}

// listener connection failed
listener.Failed = func(conn net.Conn, err error) { }

// listener connection cancelled
listener.Cancelled = func(conn net.Conn) { }

// start listener
err := listener.Start(network.TCPConnection, uint16(7878))

Author:

👨🏼‍💻 Vinzenz Weist

About

Fusion is a custom network framing protocol with a small and lightweight header.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages