1.有什么好看的源码电影,以上映的源码
2.Internet Media Type常见媒体类型列表
3.linux下socket 网络编程(客户端向服务器端发送文件) 求源代码 大哥大姐帮帮忙 ,。。源码谢谢
有什么好看的源码电影,以上映的源码
以下是我喜欢看的
你可能看过
初恋那件小事、源代码、源码牛股笔记源码、源码代号、源码肩上蝶,源码还有杨幂的源码鬼片,孤岛惊魂
纳尼亚传奇1、源码洛杉矶之战、源码黑超特警组1-2、源码生化危机4:来生、源码变形金刚2:卷土重来BD、源码荟聚源码会员日本沉没、哈利波特4:火焰杯、生化危机3灭绝、AI智能战兵[最新美国科幻、博物馆惊魂夜2高清国语,敢死队1-2、、视野区域指标源码哈利·波特与凤凰社/哈利波特:、蝙蝠侠1、黑客帝国2:重装上阵BD
Internet Media Type常见媒体类型列表
网络媒体类型列表由IANA管理,以下为常见媒体类型及其用途: 多媒体文件以“application”开头:application/atom+xml - Atom feeds
application/EDI-X - EDI X 数据,在RFC 中定义
application/EDIFACT - EDIFACT 数据,在RFC 中定义
application/json - JSON格式的数据,在RFC 中定义
application/javascript - JavaScript,kp文件改编源码在RFC 中定义,但不被IE8及之前的版本支持
application/octet-stream - 任意的二进制数据,通常用于不确定类型的数据传输
application/ogg - Ogg格式文件,在RFC中定义
application/pdf - PDF文件,在RFC 中定义
application/postscript - PostScript,在RFC 中定义
application/soap+xml - SOAP格式,在RFC 中定义
application/xhtml+xml - XHTML文件,软件升级平台源码在RFC 中定义
application/xml-dtd - DTD文件,在RFC 中定义
application/zip - ZIP文件,一种压缩格式
音频以“audio”开头:audio/basic - 1个通道、8千赫兹的音频,在RFC 中定义
audio/mp4 - MP4音频
audio/mpeg - MP3 或者MPEG音频,在RFC 中定义
audio/ogg - Ogg音频文件,在RFC 中定义
audio/vorbis - Vorbis编码的音频,在RFC 中定义
audio/x-ms-wma - wma音频,文档请参考Microsoft KB
audio/x-ms-wax - wma的音频转发器
audio/vnd.rn-realaudio - RealAudio格式,RealPlayer的音频格式。
audio/vnd.wave - WAV音频,在RFC 中定义
以 “image”开头:image/gif - GIF格式,在RFC 和 RFC 中定义
image/jpeg - JPEG 和JFIF格式,在RFC 和 RFC 中定义
image/png - png格式,在RFC 中定义
image/svg+xml - svg格式; 在SVG 1.2规范中定义
image/tiff - tiff格式,; 在RFC 中定义
image/vnd.microsoft.icon - ico格式
消息以“message”开头:message/pressed - RAR 文件
application/x-tar - Tarball 文件
text/x-jquery-tmpl - jQuery 临时文件
Type x-pkcs - PKCS 标准文件
application/x-pkcs
application/x-pkcs7-certificates
application/x-pkcs7-certreqresp
application/x-pkcs7-mime
application/x-pkcs7-mime
application/x-pkcs7-signature
linux下socket 网络编程(客户端向服务器端发送文件) 求源代码 大哥大姐帮帮忙 ,。。谢谢
源代码奉上,流程图。。。这个太简单了,你自己看看。。。。。。。
//TCP
//服务器端程序
#include< stdio.h >
#include< stdlib.h >
#include< windows.h >
#include< winsock.h >
#include< string.h >
#pragma comment( lib, "ws2_.lib" )
#define PORT
#define BACKLOG
#define TRUE 1
void main( void )
{
int iServerSock;
int iClientSock;
char *buf = "hello, world!\n";
struct sockaddr_in ServerAddr;
struct sockaddr_in ClientAddr;
int sin_size;
WSADATA WSAData;
if( WSAStartup( MAKEWORD( 1, 1 ), &WSAData ) )//初始化
{
printf( "initializationing error!\n" );
WSACleanup( );
exit( 0 );
}
if( ( iServerSock = socket( AF_INET, SOCK_STREAM, 0 ) ) == INVALID_SOCKET )
{
printf( "创建套接字失败!\n" );
WSACleanup( );
exit( 0 );
}
ServerAddr.sin_family = AF_INET;
ServerAddr.sin_port = htons( PORT );//监视的端口号
ServerAddr.sin_addr.s_addr = INADDR_ANY;//本地IP
memset( & ( ServerAddr.sin_zero ), 0, sizeof( ServerAddr.sin_zero ) );
if( bind( iServerSock, ( struct sockaddr * )&ServerAddr, sizeof( struct sockaddr ) ) == -1 )
{
printf( "bind调用失败!\n" );
WSACleanup( );
exit( 0 );
}
if( listen( iServerSock, BACKLOG ) == -1 )
{
printf( "listen调用失败!\n" );
WSACleanup( );
exit( 0 );
}
while( TRUE )
{
sin_size = sizeof( struct sockaddr_in );
iClientSock = accept( iServerSock, ( struct sockaddr * )&ClientAddr, &sin_size );
if( iClientSock == -1 )
{
printf( "accept调用失败!\n" );
WSACleanup( );
exit( 0 );
}
printf( "服务器连接到%s\n", inet_ntoa( ClientAddr.sin_addr ) );
if( send( iClientSock, buf, strlen( buf ), 0 ) == -1 )
{
printf( "send调用失败!" );
closesocket( iClientSock );
WSACleanup( );
exit( 0 );
}
}
}
/////客户端程序
#include< stdio.h >
#include< stdlib.h >
#include< windows.h >
#include< winsock.h >
#include< string.h >
#pragma comment( lib, "ws2_.lib" )
#define PORT
#define BACKLOG
#define TRUE 1
#define MAXDATASIZE
void main( void )
{
int iClientSock;
char buf[ MAXDATASIZE ];
struct sockaddr_in ServerAddr;
int numbytes;
// struct hostent *he;
WSADATA WSAData;
// int sin_size;
/* if( ( he = gethostbyname( "liuys" ) ) == NULL )
{
printf( "gethostbyname调用失败!" );
WSACleanup( );
exit( 0 );
}
*/
if( WSAStartup( MAKEWORD( 1, 1 ), &WSAData ) )//初始化
{
printf( "initializationing error!\n" );
WSACleanup( );
exit( 0 );
}
if( ( iClientSock = socket( AF_INET, SOCK_STREAM, 0 ) ) == INVALID_SOCKET )
{
printf( "创建套接字失败!\n" );
WSACleanup( );
exit( 0 );
}
ServerAddr.sin_family = AF_INET;
ServerAddr.sin_port = htons( PORT );
// ServerAddr.sin_addr = *( ( struct in_addr * )he->h_addr );
ServerAddr.sin_addr.s_addr = inet_addr( "..2." );//记得换IP
memset( &( ServerAddr.sin_zero ), 0, sizeof( ServerAddr.sin_zero ) );
if( connect( iClientSock, ( struct sockaddr * ) & ServerAddr, sizeof( struct sockaddr ) ) == -1 )
{
printf( "connect失败!" );
WSACleanup( );
exit( 0 );
}
numbytes = recv( iClientSock, buf, MAXDATASIZE, 0 );
if( numbytes == -1 )
{
printf( "recv失败!" );
WSACleanup( );
exit( 0 );
}
buf[ numbytes ] = '\0';
printf( "Received: %s", buf );
closesocket( iClientSock );
WSACleanup( );
}
/////UDP
//服务器
#include< stdio.h >
#include< string.h >
#include< winsock.h >
#include< windows.h >
#pragma comment( lib, "ws2_.lib" )
#define PORT
#define BACKLOG
#define TRUE 1
#define MAXDATASIZE
void main( void )
{
int iServerSock;
// int iClientSock;
int addr_len;
int numbytes;
char buf[ MAXDATASIZE ];
struct sockaddr_in ServerAddr;
struct sockaddr_in ClientAddr;
WSADATA WSAData;
if( WSAStartup( MAKEWORD( 1, 1 ), &WSAData ) )
{
printf( "initializationing error!\n" );
WSACleanup( );
exit( 0 );
}
iServerSock = socket( AF_INET, SOCK_DGRAM, 0 );
if( iServerSock == INVALID_SOCKET )
{
printf( "创建套接字失败!\n" );
WSACleanup( );
exit( 0 );
}
ServerAddr.sin_family = AF_INET;
ServerAddr.sin_port = htons( PORT );//监视的端口号
ServerAddr.sin_addr.s_addr = INADDR_ANY;//本地IP
memset( & ( ServerAddr.sin_zero ), 0, sizeof( ServerAddr.sin_zero ) );
if( bind( iServerSock, ( struct sockaddr * )&ServerAddr, sizeof( struct sockaddr ) ) == -1 )
{
printf( "bind调用失败!\n" );
WSACleanup( );
exit( 0 );
}
addr_len = sizeof( struct sockaddr );
numbytes = recvfrom( iServerSock, buf, MAXDATASIZE, 0, ( struct sockaddr * ) & ClientAddr, &addr_len );
if( numbytes == -1 )
{
printf( "recvfrom调用失败!\n" );
WSACleanup( );
exit( 0 );
}
printf( "got packet from %s\n", inet_ntoa( ClientAddr.sin_addr ) );
printf( "packet is %d bytes long\n", numbytes );
buf[ numbytes ] = '\0';
printf( "packet contains \"%s\"\n", buf );
closesocket( iServerSock );
WSACleanup( );
}
//客户端
#include< stdio.h >
#include< stdlib.h >
#include< windows.h >
#include< winsock.h >
#include< string.h >
#pragma comment( lib, "ws2_.lib" )
#define PORT
#define MAXDATASIZE
void main( void )
{
int iClientSock;
struct sockaddr_in ServerAddr;
int numbytes;
char buf[ MAXDATASIZE ] = { 0 };
WSADATA WSAData;
if( WSAStartup( MAKEWORD( 1, 1 ), &WSAData ) )
{
printf( "initializationing error!\n" );
WSACleanup( );
exit( 0 );
}
if( ( iClientSock = socket( AF_INET, SOCK_DGRAM, 0 ) ) == -1 )
{
printf( "创建套接字失败!\n" );
WSACleanup( );
exit( 0 );
}
ServerAddr.sin_family = AF_INET;
ServerAddr.sin_port = htons( PORT );
ServerAddr.sin_addr.s_addr = inet_addr( "..2." );//记得换IP
memset( &( ServerAddr.sin_zero ), 0, sizeof( ServerAddr.sin_zero ) );
numbytes = sendto( iClientSock, buf, strlen( buf ), 0, ( struct sockaddr * ) & ServerAddr, sizeof( struct sockaddr ) );
if( numbytes == -1 )
{
printf( "sendto调用失败!\n" );
WSACleanup( );
exit( 0 );
}
printf( "sent %d bytes to %s\n", numbytes, inet_ntoa( ServerAddr.sin_addr ) );
closesocket( iClientSock );
WSACleanup( );
}