Lines Matching full:socket
54 * UDP socket echo server
75 /* create a UDP socket */ in udpecho_socket_entry()
76 if ((sock = socket(AF_INET, SOCK_DGRAM, 0)) == -1) in udpecho_socket_entry()
78 rt_kprintf("create socket error\n"); in udpecho_socket_entry()
88 /* bind socket to server address */ in udpecho_socket_entry()
100 /* try to receive from UDP socket */ in udpecho_socket_entry()
170 * TCP socket echo server
189 /* create a TCP socket */ in tcpecho_socket_entry()
190 if ((sock = socket(AF_INET, SOCK_STREAM, 0)) == -1) in tcpecho_socket_entry()
192 rt_kprintf("create socket error\n"); in tcpecho_socket_entry()
250 /* close socket */ in tcpecho_socket_entry()