国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

? php教程 PHP開發(fā) ?? ????? ???? udp sendto ??? ?? ?? ??? ???????---65507

?? ????? ???? udp sendto ??? ?? ?? ??? ???????---65507

Sep 14, 2018 am 10:12 AM

? ?? ????? PHP? ?? ?? ? UDP ?? ??? ?????. ??? ? ??? ?? ??? ?????. ??? ??? ??? ????.

??? IP ?? ??? ??? 16???? ?? ???? ???? 2^16-1??? ?? ?? ????. ?? IP ?? ?? ??? ???? 2^16 - 1??????. UDP ??? ?? IP ?? 20???? UDP ?? 8???? ??? ??? ??? 2^16 - 1 - 20 - 8???? ?? ????. ????? ??? ?????. (? ?? ?????? ???? ???? ???? ?????.)

????:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <errno.h>
 
int main(int argc, char *argv[])
{
    struct sockaddr_in srvAddr;
    bzero(&srvAddr, sizeof(srvAddr));
    srvAddr.sin_family = AF_INET;
    srvAddr.sin_addr.s_addr = inet_addr("127.0.0.1");
    srvAddr.sin_port = htons(8888);
 
    int iSock = socket(AF_INET, SOCK_DGRAM, 0); // udp
	char szBuf[1024 * 64 -1 - 20 - 8] = {0};
    int iRet = sendto(iSock, szBuf, sizeof(szBuf), 0, (struct sockaddr *)&srvAddr, sizeof(srvAddr));
	printf("send size is %d, iRet is %d, errmsg[%s]\n", sizeof(szBuf), iRet, strerror(errno));
    
	close(iSock);
    return 0;
}

??:

send size is 65507, iRet is 65507, errmsg[Success]

???, send ??? 1??? ? ?? ??? ?????.

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <errno.h>
 
int main(int argc, char *argv[])
{
    struct sockaddr_in srvAddr;
    bzero(&srvAddr, sizeof(srvAddr));
    srvAddr.sin_family = AF_INET;
    srvAddr.sin_addr.s_addr = inet_addr("127.0.0.1");
    srvAddr.sin_port = htons(8888);
 
    int iSock = socket(AF_INET, SOCK_DGRAM, 0); // udp
	char szBuf[1024 * 64 - 20 - 8] = {0};
    int iRet = sendto(iSock, szBuf, sizeof(szBuf), 0, (struct sockaddr *)&srvAddr, sizeof(srvAddr));
	printf("send size is %d, iRet is %d, errmsg[%s]\n", sizeof(szBuf), iRet, strerror(errno));
    
	close(iSock);
    return 0;
}

?? :

send size is 65508, iRet is -1, errmsg[Message too long]

?? ?? ??:

php ?? ??(tcp/udp) ?? ??_php ??

UDPPHP ?? ?? ?? communications_php ??

? ??? ?? ????? ???? udp sendto ??? ?? ?? ??? ???????---65507? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? ????? ??
? ?? ??? ????? ???? ??? ??????, ???? ?????? ????. ? ???? ?? ???? ?? ??? ?? ????. ???? ??? ???? ???? ??? ?? admin@php.cn?? ?????.

? AI ??

Undresser.AI Undress

Undresser.AI Undress

???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover

AI Clothes Remover

???? ?? ???? ??? AI ?????.

Video Face Swap

Video Face Swap

??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

???

??? ??

???++7.3.1

???++7.3.1

???? ?? ?? ?? ???

SublimeText3 ??? ??

SublimeText3 ??? ??

??? ??, ???? ?? ????.

???? 13.0.1 ???

???? 13.0.1 ???

??? PHP ?? ?? ??

???? CS6

???? CS6

??? ? ?? ??

SublimeText3 Mac ??

SublimeText3 Mac ??

? ??? ?? ?? ?????(SublimeText3)

???

??? ??

??? ????
1601
29
PHP ????
1502
276
???