in reply to Re^4: Net::Server only sends 128bytes at a time
in thread Net::Server only sends 128bytes at a time
Well, what about this example:
if it also divides packets on 128 bytes chunks, it is nothing to do with perl and you better ask for help on http://ubuntuforums.org#include <stdio.h> #include <sys/socket.h> #include <netinet/in.h> #include <err.h> #include <string.h> int main() { int s, c; struct sockaddr_in sa; char buf[1024]; s = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); if (s < 0) err(1, "can't create socket"); sa.sin_family = AF_INET; sa.sin_port = htons(7777); sa.sin_addr.s_addr = INADDR_ANY; if (bind(s, (struct sockaddr *) &sa, sizeof(sa)) < 0 || listen(s, 10) < 0) err(1, "can't bind"); c = accept(s, NULL, NULL); memset(buf, 'x', 1024); send(c, buf, 1024, 0); return 0; }
|
|---|