- struct servent *theServent;
-
- if (name.IsNull())
- return FALSE;
-
- if (!name.IsNumber()) {
- if ((theServent = getservbyname(name.fn_str(), "tcp")) == 0)
- return FALSE;
- } else {
- if ((theServent = getservbyport(wxAtoi(name), "tcp")) == 0) {
- m_addr->sin_port = htons(wxAtoi(name));
- return TRUE;
- }
- }
-
- m_addr->sin_port = theServent->s_port;
- return TRUE;