OSSP CVS Repository

ossp - Difference in ossp-pkg/sa/sa.pod versions 1.35 and 1.36
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/sa/sa.pod 1.35 -> 1.36

--- sa.pod       2002/10/30 18:43:08     1.35
+++ sa.pod       2002/10/30 19:09:35     1.36
@@ -96,7 +96,8 @@
 =item B<Socket Input/Output Operations (Datagram Communication)>:
 
 sa_recv,
-sa_send.
+sa_send,
+sa_sendf.
 
 =item B<Socket Error Handling>:
 
@@ -428,10 +429,10 @@
 Possible values for I<id> are: C<SA_TIMEOUT_ACCEPT> (affecting
 sa_accept(3)), C<SA_TIMEOUT_CONNECT> (affecting sa_connect(3)),
 C<SA_TIMEOUT_READ> (affecting sa_read(3), sa_readln(3) and sa_recv(3))
-and C<SA_TIMEOUT_WRITE> (affecting sa_write(3), sa_writef(3) and
-sa_send(3)). Additionally you can set all four timeouts at once by using
-C<SA_TIMEOUT_ALL>. The default is that no communication timeouts are
-used which is equal to I<sec>=C<0>/I<usec>=C<0>.
+and C<SA_TIMEOUT_WRITE> (affecting sa_write(3), sa_writef(3),
+sa_send(3), and sa_sendf(3)). Additionally you can set all four timeouts
+at once by using C<SA_TIMEOUT_ALL>. The default is that no communication
+timeouts are used which is equal to I<sec>=C<0>/I<usec>=C<0>.
 
 Example: C<sa_timeout(sa, SA_TIMEOUT_ALL, 30, 0);>
 
@@ -774,6 +775,26 @@
 
 Example: C<sa_send(sa, buf, strlen(buf), NULL, saa);>
 
+=item sa_rc_t B<sa_sendf>(sa_t *I<sa>, sa_addr_t *I<raddr>, const char *I<fmt>, ...)
+
+Send formatted data data to remote address via socket.
+
+This formats a string according to the printf(3)-style format
+specification I<fmt> and sends the result to the socket as a single
+piece of data chunk. In case of a partial socket write, the not written
+data of the formatted string is internally discarded.
+
+The underlying string formatting engine is just a minimal one and for
+security and independence reasons intentionally not directly based on
+s[n]printf(3). It understands only the following format specifications:
+"C<%%>", "C<%c>" (C<char>), "C<%s>" (C<char *>) and "C<%d>" (C<int>)
+without any precision and padding possibilities. It is intended for
+minimal formatting only. If you need more sophisticated formatting, you
+have to format first into an own buffer via s[n]printf(3) and then send
+this to the remote address via sa_send(3) instead.
+
+Example: C<sa_sendf(sa, saa, "%s=%d\n", cp, i);>
+
 =back
 
 =head2 Socket Error Handling

CVSTrac 2.0.1