Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function to use existing connection #45

Open
madman22 opened this issue Mar 21, 2019 · 0 comments
Open

Function to use existing connection #45

madman22 opened this issue Mar 21, 2019 · 0 comments

Comments

@madman22
Copy link

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
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant