This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

about read(...) of TCP/IP


Hi,part of my program is:
     if ((s = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
              printf("error to creat a socket\n");
              exit(1);
    }
    if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) {
              printf("error to connect\n");
              exit(1);
     }
     read(s,buf,sizeof(buf));
Because the destination connected is a pop3 server,the function of read should gain some information ,but it won't return.From the buffer of hardware,I can see the information that I want.Because the test of ppp_ping.c runs right,so I doubt the question exists in TCP.
    Thanks a lot!
     

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]