Well, what about this example:

#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; }
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

In reply to Re^5: Net::Server only sends 128bytes at a time by zwon
in thread Net::Server only sends 128bytes at a time by alager

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.