+/*
+ * Write a formatted string to the server - implemented in terms of sock_write()
+ */
+void sock_printf(int sock, const char *format,...)
+{
+ va_list arg_ptr;
+ char buf[4096];
+ size_t len;
+
+ va_start(arg_ptr, format);
+ vsnprintf(buf, sizeof buf, format, arg_ptr);
+ va_end(arg_ptr);
+
+ sock_write(sock, buf, strlen(buf));
+}