[vtkusers] a bug of VTK4.0 ?
Jeff Lee
jeff at cdnorthamerica.com
Tue Mar 25 07:02:15 EST 2003
Song Li wrote:
> Hi,
> I am quite confused with these lines in
> vtkSocketCommunicator::WaitForConnection(int port) in VTK4.0:
>
> if ( bind(sock, (sockaddr *)&server, sizeof(server)) )
> {
> vtkErrorMacro("Can not bind socket to port " << port);
> return 0;
> }
>
equivalent to "if ( bind(sock, (sockaddr *)&server, sizeof(server)) !=
0), not a bug, just compression.
-Jeff
> As I know "bind" returns -1 when there is error, so why it isn't look
> like " if ( bind(sock, (sockaddr *)&server, sizeof(server)) < 0 )" ? A
> bug??
>
>--
>Song Li
>VRAC(Virtual Reality Application Center),Iowa State University
>Email: lisong at vrac.iastate.edu
>Homepage: http://www.vrac.iastate.edu/~lisong <http://www.vrac.iastate.edu/%7Elisong>
>
>
--
Jeff Lee
Software Engineer
Computational Dynamics North America Ltd
21 Lafayette Street, Suite 230
Lebanon NH 03766 USA
fax: 603 643 9994
phone: 603 643 9993 x109
http://www.cd-adapco.com
More information about the vtkusers
mailing list