Posted on 2009-02-03 12:46
Prayer 阅读(2417)
评论(1) 编辑 收藏 引用 所属分类:
SOCKET
#include "unp.h"
int main(int argc, char **argv)
{
int sockfd, mss, sendbuff;
socklen_t optlen;
float kk;
sockfd = Socket(AF_INET, SOCK_STREAM, 0); /* Fetch and print the TCP maximum segment size. */
optlen = sizeof(mss);
sendbuff =2048;
Setsockopt(sockfd, SOL_SOCKET, SO_SNDBUF, sendbuff, sizeof(sendbuff));
optlen = sizeof(sendbuff);
Getsockopt(sockfd, SOL_SOCKET, SO_SNDBUF, sendbuff, &optlen);
printf("After send buffer size = %d\n", sendbuff);
exit(0);
}