w3url = W3_Parse_URL(argv[1]);
if(w3url != NULL) {
struct W3* w3 = W3_Create("nntp", w3url->host, w3url->port);
- W3_On(w3, "ftpresp", resp_handler);
+ W3_On(w3, "nntpresp", resp_handler);
W3_On(w3, "data", data_handler);
W3_Send_Request(w3);
W3_Free_URL(w3url);
extern int strcasecmp(const char* s1, const char* s2);
-void __W3_NNTP_Request(struct W3* w3) { __W3_Debug("LibW3-NNTP", "Sending the request"); }
+void __W3_NNTP_Request(struct W3* w3) {
+ __W3_Debug("LibW3-NNTP", "Sending the request");
+ char* buf = malloc(w3->readsize);
+ while(true) {
+ int len = __W3_Auto_Read(w3, buf, w3->readsize);
+ if(len <= 0) break;
+ }
+ free(buf);
+}
extern "C" {
#endif
-#define LIBW3_VERSION "2.12D" \
+#define LIBW3_VERSION "2.12E" \
SUFFIX
#ifdef __cplusplus