Jump to content

Talk:Parse an IP Address: Difference between revisions

elaborate the <<specify port or not>> issue with an example
(elaborate the <<specify port or not>> issue with an example)
Line 27:
 
:I have (after several not-so-good attempts) done my best making the result format unambiguous and complete for this task. Let me know what you think.
:Meanwhile, as Michael Mol points out, port 0 can be different from no port specified. (For example, when configuring an http server using sockets, 0 would mean "let the OS pick an unassigned port to listen on" while no port would mean "listen on port 80 or fail if it's already in use".) --[[User:Rdm|Rdm]] 15:47, 28 September 2011 (UTC)
:: The only part I don't understand is "In languages where variant result types are clumsy". --[[User:Short Circuit|Michael Mol]] 15:48, 28 September 2011 (UTC)
::: How would you represent the required results in C, for example? --[[User:Rdm|Rdm]] 15:49, 28 September 2011 (UTC)
6,962

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.