Lines Matching defs:port
841 int network_loopback_client(int port, int type, std::string* error) {
855 addr.sin_port = htons(port);
875 D("could not connect to %s:%d: %s", type != SOCK_STREAM ? "udp" : "tcp", port,
883 port);
884 D("port %d type %s => fd %d", port, type != SOCK_STREAM ? "udp" : "tcp", fd);
892 static int _network_server(int port, int type, u_long interface_address, std::string* error) {
907 addr.sin_port = htons(port);
925 // same port, so instead use SO_EXCLUSIVEADDRUSE.
942 D("could not bind to %s:%d: %s", type != SOCK_STREAM ? "udp" : "tcp", port, error->c_str());
951 D("could not listen on %s:%d: %s", type != SOCK_STREAM ? "udp" : "tcp", port,
960 port);
961 D("port %d type %s => fd %d", port, type != SOCK_STREAM ? "udp" : "tcp", fd);
966 int network_loopback_server(int port, int type, std::string* error) {
967 return _network_server(port, type, INADDR_LOOPBACK, error);
970 int network_inaddr_any_server(int port, int type, std::string* error) {
971 return _network_server(port, type, INADDR_ANY, error);
974 int network_connect(const std::string& host, int port, int type, int timeout, std::string* error) {
990 snprintf(port_str, sizeof(port_str), "%d", port);
1003 *error = android::base::StringPrintf("cannot resolve host '%s' and port %s: %s",
1043 port);
1044 D("host '%s' port %d type %s => fd %d", host.c_str(), port, type != SOCK_STREAM ? "udp" : "tcp",
1180 D("adb_socketpair: bound on port %d", ntohs(addr->sin_port));