Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.unix.programmer > #849

Re: socket programming. read from server.

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Rainer Weikusat <rweikusat@mssgmbh.com>
Newsgroups comp.unix.programmer
Subject Re: socket programming. read from server.
Date Wed, 22 Jun 2011 16:42:41 +0100
Lines 24
Message-ID <87k4cdan4e.fsf@sapphire.mobileactivedefense.com> (permalink)
References <88dc219d-5c3e-4d01-8b32-5280eaffcd04@l6g2000vbn.googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Trace individual.net 6kXFyc7sc93SPh14solc8wP4r5DtqQiThG8yEoHZ7SYA4tZVc=
Cancel-Lock sha1:yh+92p3sjSz+rC5j04Fh0QQ/YrQ= sha1:C8F/sc9hFoWGS27xiT3wnfNqQWc=
User-Agent Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)
Xref x330-a1.tempe.blueboxinc.net comp.unix.programmer:849

Show key headers only | View raw


Steve Richter <stephenrichter@gmail.com> writes:

[...]

> I am writing a small ftp client in C for the IBM AS400 using the UNIX
> APIs. When the client code connects to the FTP server it reads back
> the initial welcome messages. My code reads from the server, gets
> some /r terminated messages. Reads again and gets more /r terminated
> welcome messages. Then reads a 3rd time and blocks because there is
> nothing more to read.  What in the socket protocol tells me the 3rd
> read is going to block?

Nothing. The FTP protocol definition (RFC959), however, would tell you
that a server reply is either a single line reply composed of a
3-digit reply code, followed by an ASCII space character (0x20),
possibly followed by some informative text and terminated by a telnet
end-of-line sequence (ASCII CR, ASCII LF), or that it is a multiline
reply. In the latter case the first line will have a hypen (-) instead
of a space after the reply code and the last line will start with the
same reply code as the first, this time followed by a space.

More details:

	http://www.faqs.org/rfcs/rfc959.html

Back to comp.unix.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

socket programming. read from server. Steve Richter <stephenrichter@gmail.com> - 2011-06-22 06:37 -0700
  Re: socket programming. read from server. Steve Richter <stephenrichter@gmail.com> - 2011-06-22 08:12 -0700
  Re: socket programming. read from server. Richard Kettlewell <rjk@greenend.org.uk> - 2011-06-22 16:31 +0100
  Re: socket programming. read from server. Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-06-22 16:42 +0100
  Re: socket programming. read from server. David Schwartz <davids@webmaster.com> - 2011-06-22 09:00 -0700
    Re: socket programming. read from server. Steve Richter <stephenrichter@gmail.com> - 2011-06-22 09:05 -0700
  Re: socket programming. read from server. "Heinrich Wolf" <invalid@invalid.invalid> - 2011-06-22 22:50 +0200
  Re: socket programming. read from server. Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-06-22 22:22 -0400
    Re: socket programming. read from server. Michael Press <rubrum@pacbell.net> - 2011-06-24 14:08 -0700

csiph-web