@@ -66,12 +66,12 @@ hints.ai_socktype = SOCK_STREAM; if (getaddrinfo([node cString], [service cString], &hints, &res0)) @throw [OFAddressTranslationFailedException newWithClass: isa - andNode: node - andService: service]; + node: node + service: service]; for (res = res0; res != NULL; res = res->ai_next) { if ((sock = socket(res->ai_family, res->ai_socktype, res->ai_protocol)) == INVALID_SOCKET) continue; @@ -98,22 +98,22 @@ if ((he = gethostbyname([node cString])) == NULL) { [mutex unlock]; @throw [OFAddressTranslationFailedException newWithClass: isa - andNode: node - andService: service]; + node: node + service: service]; } if ((se = getservbyname([service cString], "TCP")) != NULL) port = se->s_port; else if ((port = htons(atoi([service cString]))) == 0) { [mutex unlock]; @throw [OFAddressTranslationFailedException newWithClass: isa - andNode: node - andService: service]; + node: node + service: service]; } memset(&addr, 0, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_port = port; @@ -121,12 +121,12 @@ if (he->h_addrtype != AF_INET || (sock = socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) { [mutex unlock]; @throw [OFConnectionFailedException newWithClass: isa - andNode: node - andService: service]; + node: node + service: service]; } for (ip = he->h_addr_list; *ip != NULL; ip++) { memcpy(&addr.sin_addr.s_addr, *ip, he->h_length); @@ -145,12 +145,12 @@ } #endif if (sock == INVALID_SOCKET) @throw [OFConnectionFailedException newWithClass: isa - andNode: node - andService: service]; + node: node + service: service]; return self; } - bindService: (OFString*)service @@ -160,13 +160,13 @@ if (sock != INVALID_SOCKET) @throw [OFAlreadyConnectedException newWithClass: isa]; if ((sock = socket(family, SOCK_STREAM, 0)) == INVALID_SOCKET) @throw [OFBindFailedException newWithClass: isa - andNode: node - andService: service - andFamily: family]; + node: node + service: service + family: family]; #ifdef HAVE_GETADDRINFO struct addrinfo hints, *res; memset(&hints, 0, sizeof(struct addrinfo)); @@ -174,19 +174,19 @@ hints.ai_socktype = SOCK_STREAM; if (getaddrinfo([node cString], [service cString], &hints, &res)) @throw [OFAddressTranslationFailedException newWithClass: isa - andNode: node - andService: service]; + node: node + service: service]; if (bind(sock, res->ai_addr, res->ai_addrlen) == -1) { freeaddrinfo(res); @throw [OFBindFailedException newWithClass: isa - andNode: node - andService: service - andFamily: family]; + node: node + service: service + family: family]; } freeaddrinfo(res); #else struct hostent *he; @@ -194,32 +194,32 @@ struct sockaddr_in addr; uint16_t port; if (family != AF_INET) @throw [OFBindFailedException newWithClass: isa - andNode: node - andService: service - andFamily: family]; + node: node + service: service + family: family]; [mutex lock]; if ((he = gethostbyname([node cString])) == NULL) { [mutex unlock]; @throw [OFAddressTranslationFailedException newWithClass: isa - andNode: node - andService: service]; + node: node + service: service]; } if ((se = getservbyname([service cString], "TCP")) != NULL) port = se->s_port; else if ((port = htons(atoi([service cString]))) == 0) { [mutex unlock]; @throw [OFAddressTranslationFailedException newWithClass: isa - andNode: node - andService: service]; + node: node + service: service]; } memset(&addr, 0, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_port = port; @@ -226,23 +226,23 @@ if (he->h_addrtype != AF_INET || he->h_addr_list[0] == NULL) { [mutex lock]; @throw [OFAddressTranslationFailedException newWithClass: isa - andNode: node - andService: service]; + node: node + service: service]; } memcpy(&addr.sin_addr.s_addr, he->h_addr_list[0], he->h_length); [mutex unlock]; if (bind(sock, (struct sockaddr*)&addr, sizeof(addr)) == -1) @throw [OFBindFailedException newWithClass: isa - andNode: node - andService: service - andFamily: family]; + node: node + service: service + family: family]; #endif return self; } @@ -251,11 +251,11 @@ if (sock == INVALID_SOCKET) @throw [OFNotConnectedException newWithClass: isa]; if (listen(sock, backlog) == -1) @throw [OFListenFailedException newWithClass: isa - andBackLog: backlog]; + backLog: backlog]; return self; } - listen @@ -263,11 +263,11 @@ if (sock == INVALID_SOCKET) @throw [OFNotConnectedException newWithClass: isa]; if (listen(sock, 5) == -1) @throw [OFListenFailedException newWithClass: isa - andBackLog: 5]; + backLog: 5]; return self; } - (OFSocket*)accept