can I seek a socket descriptor?
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > can I seek a socket descriptor?




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    can I seek a socket descriptor?  
Madhav


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-22-05 12:54 PM

Hi all,
Can I read data from a socket (non blocking datagram socket) at
a specific offset? like we do lseek() on a file descriptor?

also, can I use the MSG_PEEK flag to traverse the socket
queue repeatedly?

Thanks in advance for your help.


Madhav.






[ Post a follow-up to this message ]



    Re: can I seek a socket descriptor?  
Thomas Maier-Komor


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-22-05 12:54 PM

Madhav wrote:
> Hi all,
>         Can I read data from a socket (non blocking datagram socket) at
> a specific offset? like we do lseek() on a file descriptor?
>
>           also, can I use the MSG_PEEK flag to traverse the socket
> queue repeatedly?
>
>              Thanks in advance for your help.
>
>
> Madhav.
>

man lseek says:
ERRORS
..
ESPIPE
The fildes argument is associated with a pipe, a FIFO,
or a socket.


Tom





[ Post a follow-up to this message ]



    Re: can I seek a socket descriptor?  
David Schwartz


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-22-05 10:57 PM


"Madhav" <madhav.kelkar@gmail.com> wrote in message
news:1119436072.072221.153250@g43g2000cwa.googlegroups.com...
> Hi all,
>        Can I read data from a socket (non blocking datagram socket) at
> a specific offset? like we do lseek() on a file descriptor?

No.

>          also, can I use the MSG_PEEK flag to traverse the socket
> queue repeatedly?

No, and you should definitely *not* want to. Your program's primary
obligation is to keep the queue empty.

DS







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 10:59 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register