Searched refs:listensock (Results 1 – 2 of 2) sorted by relevance
/system/extras/tests/tcp_nuke_addr/ |
D | tcp_nuke_addr_test.cpp | 60 int listensock; in bindRandomAddr() local 61 if ((listensock = socket(AF_INET, SOCK_STREAM, 0)) == -1) PERROR_EXIT("listensock"); in bindRandomAddr() 62 if (bind(listensock, (sockaddr *) &sin, sizeof(sin)) == -1) PERROR_EXIT("bind"); in bindRandomAddr() 63 if (listen(listensock, 10) == -1) PERROR_EXIT("listen"); in bindRandomAddr() 65 return listensock; in bindRandomAddr() 91 void connectLoop(sockaddr_in listenaddr, int listensock, in connectLoop() argument 105 int acceptedsock = accept(listensock, NULL, 0); in connectLoop() 130 int listensock = bindRandomAddr(); in main() local 133 if (getsockname(listensock, (sockaddr *) &sin, &len) == -1) PERROR_EXIT("getsockname"); in main() 144 connectThreads[i] = new std::thread(connectLoop, sin, listensock, &lock, &attempts); in main()
|
/system/extras/tests/net_test/ |
D | net_test.py | 162 listensock = socket(family, socktype, 0) 163 listensock.bind((addr, 0)) 164 addr = listensock.getsockname() 165 listensock.listen(1) 167 acceptedsock, _ = listensock.accept() 170 listensock.close()
|