pocoproject/poco — pull request #598 by WesternStar (2014-11-06 15:23:51+00:00)
Title: Correcting erroneous documentation in raw socket and datagram socket

Bind chooses a source port to get data from and connect attempts to establish logical communication with node and determine if it exists. At the time of the call to connect either there is a defined source port or an ephemeral port will be chosen. Since bind defines source port and address a call to bind after connecting is invalid since it violates the established connection. However all calls to bind before connect are fine. The functionality is fine in the code just needs a doc update

tldr: you can bind and connect as long as you bind first.