当前位置: 技术问答>linux和unix
linux socket sendto( )函数问题,初学,大家指点!
来源: 互联网 发布时间:2016-05-11
本文导语: #include #include #include #include #include #include #include #include #include #include #include #include #define PORT 8899; int count = 0; int env = 0; void signal_handler() { env = 1; printf("count in sendmessage is %dn",count); } int...
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define PORT 8899;
int count = 0;
int env = 0;
void signal_handler()
{
env = 1;
printf("count in sendmessage is %dn",count);
}
int main()
{
// char send_msg[1024];
char recv_msg[1024];
unsigned char j;
struct timeval tvb,tve;
struct timezone tzb,tze;
char send_msg[1024*1024];
int i;
memset(send_msg,'B',sizeof(send_msg));
//printf("send_msg is %sn",send_msg);
// unsigned char j;
/* for(i=0;i
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define PORT 8899;
int count = 0;
int env = 0;
void signal_handler()
{
env = 1;
printf("count in sendmessage is %dn",count);
}
int main()
{
// char send_msg[1024];
char recv_msg[1024];
unsigned char j;
struct timeval tvb,tve;
struct timezone tzb,tze;
char send_msg[1024*1024];
int i;
memset(send_msg,'B',sizeof(send_msg));
//printf("send_msg is %sn",send_msg);
// unsigned char j;
/* for(i=0;i