OBEX_GetFD

Name

OBEX_GetFD --  Get FD

Synopsis

int OBEX_GetFD (obex_t * self);

Arguments

self

OBEX handle

Description

Returns the filedescriptor of the transport. Returns -1 on error. Note that if you for example have a custom transport, no fd is available.

The returned filehandle can be used to do select on, before calling OBEX_HandleInput

There is one subtelty about this function. When the OBEX connection is established, it returns the connection filedescriptor, while for an unconnected server it will return the listening filedescriptor. This mean that after receiving an incomming connection, you need to call this function again.