kb
2 楼
HELP!!!
I am writting a FTP client program at UNIX
environment--Solaris 8, and I have a big problem now.
Here is what I had done:
I have build the control connection at port 21.(Using
socket, connect,read,write, etc)
I send a "PASV" command through control connection.(Using
write.)
I built the data connection according the response of PASV
command--the six numbers.(
*********part of my code************
data = socket(AF_INET, SOCK_STREAM, 0);
data_addr.sin_family = AF_INET;
I am writting a FTP client program at UNIX
environment--Solaris 8, and I have a big problem now.
Here is what I had done:
I have build the control connection at port 21.(Using
socket, connect,read,write, etc)
I send a "PASV" command through control connection.(Using
write.)
I built the data connection according the response of PASV
command--the six numbers.(
*********part of my code************
data = socket(AF_INET, SOCK_STREAM, 0);
data_addr.sin_family = AF_INET;
d*y
3 楼
挺可爱啊!
m*m
4 楼
For one thing, read returns an "int" not a pointer. You
should compare it with 0.
You should check if n < 0 for any possible errors too.
You'd better use select() instead of keep polling with
read().
【在 kb 的大作中提到】
: HELP!!!
: I am writting a FTP client program at UNIX
: environment--Solaris 8, and I have a big problem now.
: Here is what I had done:
: I have build the control connection at port 21.(Using
: socket, connect,read,write, etc)
: I send a "PASV" command through control connection.(Using
: write.)
: I built the data connection according the response of PASV
: command--the six numbers.(
L*y
5 楼
比google强多了
相关阅读
北美是不是没老中玩solaris?求教:奇怪的应用程序crash (转载)Bash里面 <<< 是什么意思shell问题请教about compiling new glibc/gcc in fc14 (转载)请教一个R入门问题求Sed-and-Awk-101-Hacks电子版问题:WinScp counterpart in Ubuntu苦力犯坑爹活动 (转载)The Qt Project is live!(zz)ultraedit for linux有了?急问linux下的窗口并排TCSH里怎么用setenv把一个带有空格的路径加给$PATH?有什么经典书全面介绍linux security的吗? (转载)cygwin是干什么的问个问题:路过的请进来看看,面试中的unix, linux的几个问题,不知道自己答对了没有。如何在后台运行shell 并且输出运行结果大家好,请问Mac用什么做网站的软件比较好用?could Matlab 2013R installed on Ubuntu 14.04 32 bit?