lkml.org 
[lkml]   [1997]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: struct socket and peers
James R. Leu wrote:
>
> This a "How do I do this in the kernel" question. If there is a better list
> to post to, please give me the address, and I will take my question else
> where.
>
> With a udp socket (struct socket) how can I tell if it's peer is connected,
> or if there is data waitng to be read.
>
> It is my understanding that (struct socket*)s->conn is not used with IP
> protocols.
>
> Thanks
> --
> James R. Leu

Hi James,
UDP is connectionless in nature, you just use the sendto() recvfrom()
calls to send to a remote IP/port or receive from a remote IP/port UDP
socket. This assumes you have already done the work to create the
socket, etc.

Fred

\
 
 \ /
  Last update: 2005-03-22 13:39    [W:0.028 / U:1.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site