1、 引言 linux的兴起可以说是Internet创造的一个奇迹。linux作为一个完全开放其原代码的免费的自由软件,兼容了各种UNIX标准(如 POSIX、UNIX System V 和 BSD UNIX 等)的多用户、多任务的具有复杂内核的操作系统。在中国,随着Internet的普及,一批主要以高等院校的学生和ISP的技术人员组成的linux爱好 者队伍已经蓬勃成长起来。越来越多的编程爱好者也逐渐酷爱上这个优秀的自由软件。本文介绍了linux下socket的基本概念和函...
The future of the linux Security Module api Back in 2001, the very first linux kernel summit included a discussion on security policies. At that meeting, it was decided that there was no interest in patching in the several competing implementations which were available at that time. Instead, developers interested in security were asked to create a generic interface which could be used by any secur...
以下是clinet端的源代码
#include "unp.h"
main( int argc, char **argv )
{
int sockfd, n;
char recvline[MAXLINE+1];
struct sockaddr_in servaddr;
/*struct sockaddr_in{
* short int sin_family;
* unsigned short int sin_port;
* struct in_addr sin_addr;
* unsigned char sin_zero[8];
*/
struct hostent *he;
if ( argc != 2 )
{
fprintf(stderr,"usage: a.out
我将buf设得很大,为什么一次还是接收不完
[code]
#include
大家好,我在linux下写了一个用socket传输二进制文件的程序,可是传过来的mp3文件效果很烂,我想可能是因为默认的传输模式是文本,不知道怎样设置socket的传输模式呢? a billion thanks small_snap