Skip to content

Function to use existing connection #45

@madman22

Description

@madman22

I had to add a function to this library to allow using the netstack library.

func UseConnection(addr string, conn net.Conn) (*FTP, error) {
writer := bufio.NewWriter(conn)
reader := bufio.NewReader(conn)
object := &FTP{conn: conn, addr: addr, reader: reader, writer: writer, debug: false}
object.receive()
return object, nil
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions