Home
last modified time | relevance | path

Searched refs:clientAddr (Results 1 – 4 of 4) sorted by relevance

/haiku/src/tests/system/network/
H A Dudp_client.c48 struct sockaddr_in serverAddr, clientAddr; in main() local
64 memset(&clientAddr, 0, sizeof(struct sockaddr_in)); in main()
65 clientAddr.sin_family = AF_INET; in main()
66 clientAddr.sin_port = htons(atoi(argv[3])); in main()
67 printf("binding to port %u\n", ntohs(clientAddr.sin_port)); in main()
68 status = bind(sockFD, (struct sockaddr *)&clientAddr, sizeof(struct sockaddr_in)); in main()
H A Dudp_echo.c97 struct sockaddr_in clientAddr; in udp_echo_server() local
100 len = sizeof(clientAddr); in udp_echo_server()
101 status = recvfrom(sockFD, buf, MAXLEN-1, 0, (struct sockaddr*)&clientAddr, &len); in udp_echo_server()
107 printf("got <%s> from client(%08x:%u)\n", buf, clientAddr.sin_addr.s_addr, clientAddr.sin_port); in udp_echo_server()
116 (struct sockaddr*)&clientAddr, sizeof(clientAddr)); in udp_echo_server()
H A Dtcp_connection_test.cpp90 sockaddr_in clientAddr; in main() local
91 socklen_t clientAddrLen = sizeof(clientAddr); in main()
92 if (getsockname(fd, (sockaddr*)&clientAddr, &clientAddrLen) in main()
96 previousPort = ntohs(clientAddr.sin_port); in main()
/haiku/src/tests/kits/net/
H A DNetEndpointTest.cpp19 static BNetAddress clientAddr("127.0.0.1", 51234); variable
201 checkAddrsAreEqual(remoteAddr, clientAddr, in testServer()
204 checkArchive(server, SOCK_DGRAM, serverAddr, clientAddr); in testServer()
231 checkAddrsAreEqual(remoteAddr, clientAddr, in testServer()
249 checkArchive(server, SOCK_STREAM, serverAddr, clientAddr); in testServer()
260 status_t status = client.Bind(clientAddr); in testClient()
268 checkAddrsAreEqual(client.LocalAddr(), clientAddr, in testClient()
279 checkArchive(client, SOCK_DGRAM, clientAddr, serverAddr); in testClient()
291 status_t status = client.Bind(clientAddr); in testClient()
299 checkAddrsAreEqual(client.LocalAddr(), clientAddr, in testClient()
[all …]