Brian Foshee
025459f901
Make ServerConn safe for concurrent use
...
ServerConn's textproto.Conn is safe for concurrent access. This adds
calls to StartResponse() and EndResponse() to put that to use wherever
Cmd() is called.
https://golang.org/pkg/net/textproto/#Conn.Cmd
Additionally, this adds a sync.Mutex on ServerConn to provide
concurrency protection for data commands such as STOR and RETR that need
to run through synchronous steps.
2016-03-03 14:30:28 -05:00
Julian Kornberger
ff557cea69
Create mock for multiline test
...
This removes the dependency to ftp.mozilla.org
2015-08-29 15:26:40 +02:00
Julien Laffaye
7acded32b2
Add a test for the legacy Connect function.
2015-08-21 18:47:44 +02:00
Julien Laffaye
d640995c66
Add tests for timeout and wrong login.
2015-08-21 18:36:56 +02:00
Julien Laffaye
7534ffcb97
Add a test for RetrFrom method.
2015-08-20 22:47:09 +02:00
Julian Kornberger
6f8509b5d6
Increase test coverage
2015-08-20 10:37:56 +02:00
Julian Kornberger
5bb86ee66f
Test PASV as well
2015-08-20 01:51:00 +02:00
Julien Laffaye
519b366223
Silence StatusNotImplemented error for Logout()
2015-08-19 00:17:44 +02:00
Julian Kornberger
dd7e903125
Use localhost to test IPv6 connectivity
2015-08-18 22:58:00 +02:00
Julian Kornberger
77206a0866
Add Travis CI
2015-08-18 20:56:31 +02:00
Julien Laffaye
0ae5d598fa
Use prefered API function.
2015-08-18 19:03:26 +02:00
Julien Laffaye
3e21d70d53
Skip TestConnIPv6 in short mode.
2015-08-18 19:02:23 +02:00
Julien Laffaye
a6e47bb27d
Merge branch 'ipv6' of https://github.com/stacktic/ftp into stacktic-ipv6
...
Conflicts:
ftp.go
2015-08-18 18:52:29 +02:00
Julien Laffaye
110a39bff4
Skip functional testing in short mode.
2015-08-18 18:39:31 +02:00
Julien Laffaye
a9410e3e51
Implements timeouts.
...
Added DialTimeout and Dial functions.
Fixes issue #27 .
2015-03-16 23:45:56 +01:00
Arnaud Ysmal
691fac98af
Force EPSV for IPv6 hosts and fix split of IPv6:port
2013-12-04 23:57:46 +01:00
SunRunAway
2a6b9c2640
Merge remote-tracking branch 'upstream/master' into feature/fix_ReadCodeLine
2013-07-10 18:20:42 +08:00
SunRunAway
65a25a2848
do ReadCodeLine in Close() @ ReadCloser
2013-07-10 18:18:32 +08:00
Julien Laffaye
60693cc590
Add a comment to state why TestConn2 is interesting.
2013-07-08 08:44:16 +02:00
SunRunAway
66a09f43d5
use ReadResponse @Connect
2013-07-08 13:48:11 +08:00
Julien Laffaye
91fc6ada34
Added Logout() method.
2013-05-19 21:15:23 +02:00
Julien Laffaye
acaf7edcbc
gofmt
2013-02-17 10:31:56 +01:00
jlaffaye
6110501482
Added CurrentDir() and ChangeDirToParent()
...
Added more tests.
2011-09-07 16:52:52 +02:00
jlaffaye
6aaa275d08
Login() is a function on its own.
...
It allows to try multiple logins without closing the connection.
Drop the useless ConnectAnonymous.
2011-09-06 18:27:30 +02:00
jlaffaye
b70c76ed28
More commands and their tests.
...
Delete()
MakeDir()
RemoveDir()
2011-09-06 00:02:01 +02:00
jlaffaye
a87255661d
Better error handling, new commands.
...
The code is no safer.
Added Stor(), Rename(), NoOp()
Improved Retr()
Added client tests (requires a ftp server on localhost)
2011-09-05 23:36:14 +02:00