Commit 0e7e65d8 authored by jan.koester's avatar jan.koester
Browse files

timeoput use seconds now

parent 2af2caec
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -72,10 +72,10 @@ void netplus::socket::setnonblocking(){
    }
}

void netplus::socket::setTimeout(int usec){
void netplus::socket::setTimeout(int sec){
    struct timeval timeout;
    timeout.tv_sec =  0;
    timeout.tv_usec = usec;
    timeout.tv_sec =  sec;
    timeout.tv_usec = 0;
    if (setsockopt (_Socket, SOL_SOCKET, SO_RCVTIMEO, &timeout,
        sizeof timeout) < 0){

+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ namespace netplus {
            socket();
            virtual      ~socket();
            void                     setnonblocking();
            void                     setTimeout(int usec);
            void                     setTimeout(int sec);
            
            virtual void             accept(socket *csock)=0;
            virtual void             bind()=0;
+1 −1
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ void netplus::socket::setnonblocking(){
    }
}

void netplus::socket::setTimeout(int usec){
void netplus::socket::setTimeout(int sec){
    return;
}