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强多了
相关阅读
Lesstif的声明easy problem (合集) coconutOne question on installing Solaries 8 on PC?How to get the name of current executable in a library routine?Re: [转载] How to install Solaris 7 Over NT?好马配好鞍/介绍一套linux牛书/O'Reilly Animal Book寻找nxterm怎样用mail把某一文本文件发送给一个email地址?Re: 请问大家都是怎么BACKUP自己的source code的?还有VERSIONS?(linux/unixRe: how to change all the files .cpp to .CRe: 大侠们, 怎么改PINE连接MAIL SERVER时用的ID?关于cxterm的问题请问大家都是怎么BACKUP自己的source code的?还有VERSIONS?(linux/unix)怎么才能让打印机认中文?Re: 这是为什么?DEC Alpha到底有多快?文件的LINK到底有什么用处?[转载] what does this mean?Re: 请推荐一本perl book好不好[公告]投票ID名单