C语言-基于P1300SOCKET实现.pdfVIP

  • 1
  • 0
  • 约1.34千字
  • 约 8页
  • 2017-07-05 发布于河南
  • 举报
C语言-基于P1300SOCKET实现

switch(soc_notify-event_type) { case SOC_WRITE: print_soc_info(LNotify Socket Write!); break; case SOC_READ: print_soc_info(LNotify Socket Read!); socket_receive(); break; case SOC_CONNECT: print_soc_info(L--Notify Soket Connect!); socket_send(); break; case SOC_CLOSE: print_soc_info(LNotify Soket Close!); soc_close(socket_id); break; default: print_soc_info(LNoticfy Scket Error!); soc_close(socket_id); socket_id=-1; break; } } static void init_socket(void) { kal_int8 ret; kal_uint8 val=1; #ifndef MMI_ON_HARDWARE_P kal_uint8 addr[4] = {192, 168, 0, 1}; #else //kal_uint8 addr[4] = {10, 0, 0, 172}; //cmwap•ãE²y kal_uint8 addr[4] = {64, 233, 189, 99};// cmnet•ãE²y #endif print_reset(); #ifndef MMI_ON_HARDWARE_P soc_init_win32(); //PCÓ,óS*ü #endif print_soc_info(LStart Soket Create!); socket_id=soc_create(PF_INET,SOCK_STREAM,0,MOD_MMI,account_id);//„ÎE²y if(socket_id0) { print_soc_info(LSocket Create Error!); return;

文档评论(0)

1亿VIP精品文档

相关文档