>Hello!
>
>> Ive solved it by using TIOCOUTQ to check how much is free in the sending
>> buffer.
>
>TIOCOUTQ is undefined for sockets. "T" stands for terminal
>and it returns amount of data _queued_ in tty, rather than available
>for write. TIOCINQ is undefined for sockets as well, but it is alias
>for FIONREAD.
>
Hmm, didn't know this, thanks.
>Blocking sockets make no guarantees about blocking when
>writing more than one byte and always may do partial writes.
>Use non-blocking IO, if you do not want to block.
>
Blocking or non-blocking, the write will still split it.
-- Jerry.Lundström:<jerry.lundstrom@citat.se>:system.developer/programmer icq.18682823:mobile+46.739.876053:phone+46.31.7107244:fax+46.31.7107201 citat.solutions:Kronhusgatan.9:SE-411.05.Gothenburg:Sweden www.citat.se/solutions- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/