dutchcoders / dutchcoders/goftp
Function to use existing connection
- Dominant language
- Go
- Stars
- 280
- Forks
- 94
- PR merge metrics
- No merged PRs in 30d
Description
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
}
Contributor guide
No contributing guide indexed for this repository
Research direction
Locate the FTP type and the existing connection setup, then compare them with the proposed UseConnection function in the issue. Confirm how connection errors and receive handling work in the current implementation. Done means callers can provide an existing net.Conn and receive a usable FTP instance without breaking existing connection paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100