To get TWSocket to compile under OSX (FMX) and Windows

 

Line 6611

                    FErrorMessage := SocketErrorDesc(FErrorCode);

Should be

                    FErrorMessage := WSocketErrorDesc(FErrorCode); 

 

The code at line 9718 should be excluded for POSIX

{$IFNDEF POSIX}

    if FExclusiveAddr then begin

    { V8.36 Prevent other applications accessing this address and port }

        optval  := -1;

        iStatus := WSocket_Synchronized_SetSockOpt(FHSocket, SOL_SOCKET,

                                                   SO_EXCLUSIVEADDRUSE,

                                                   @optval, SizeOf(optval));

 

        if iStatus <> 0 then begin

            SocketError('setsockopt(SO_EXCLUSIVEADDRUSE)');

            Close;

            Exit;

        end;

    end;

{$ENDIF}

 

Line 10594

    RaiseException(Line, Error, SocketErrorDesc(Error), FriendlyMsg,

                                   sockfunc, FAddrStr, FPortStr, FProtoStr);
{ V5.26 }

 

Should be:

   RaiseException(Line, Error, WSocketErrorDesc(Error), FriendlyMsg, 

                                   sockfunc, FAddrStr, FPortStr, FProtoStr);
{ V5.26 }

 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to