package
0.10.2
Repository: https://github.com/sigcn/pg.git
Documentation: pkg.go.dev

# README

RDT

a Reliable Data Transfer protocol.

Example

Server

packetConn, err := net.ListenPacket("udp", "192.168.3.99:22334")
if err != nil {
    panic(err)
}
listener, err := rdt.Listen(packetConn)
if err != nil {
    panic(err)
}

for {
    conn, err := listener.Accept()
    if err != nil {
        panic(err)
    }
    handle(conn)
}

Client

packetConn, err := net.ListenPacket("udp", "192.168.3.98:22335")
if err != nil {
    panic(err)
}
listener, err := rdt.Listen(packetConn)
if err != nil {
    panic(err)
}

conn, err := listener.OpenStream(&net.UDPAddr{
    IP:   net.ParseIP("192.168.3.99"),
    Port: 22334,
})
if err != nil {
    panic(err)
}
...

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
RDTListener reliable data transmission listener.
No description provided by the author

# Type aliases

No description provided by the author