OK, I wrote too fast. I should have taken the time to re-read all this.

I got back to the spec. It says:

> The terms client and server refer to the originator/receiver of the
OBEX connection, 
> not necessarily who originated the low level IrLAP connection.

I guess this is where I got this (false) idea. So, an obex connection
starts when a CONNECT_CMD has been sent and replied. The client is the
one sending the CONNECT_CMD.

The spec also says:

>Each side of a communication link may have both client and server if
desired, and thereby create a peer
>to peer relationship between applications by using a pair of OBEX
sessions, one in each direction.

As you said, both sides must then call OBEX_Init and
xxxOBEX_TransportConnect. They share the physical link using different
sockets but that is all they have in common. So even though the spec
does not explicitly prevent the server to send requests, I think you are
right and it is safe to say that only the client can send requests.

So it looks like some of my understanding was wrong. I suggest we start
by discussing what MODE_SRV/MODE_CLI are, and what the exact meaning of
the 'mode' parameter in the event callback is ?

Eric:

PS: There is also the following chapter that I don't really understand:

3.3.1.10 OBEX Operations without Connect
It is highly recommended that implementations assume default values for
connection parameters
(currently just a minimum OBEX packet size of 255 bytes) and accept
operations such as PUT and GET
without first requiring a CONNECT operation.

So, CONNECT seems not mandatory. If there is no CONNECT_CMD, how do you
determine who the client is?


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Hendrik Sattler
Sent: dimanche 13 janvier 2008 20:08
To: [email protected]
Subject: Re: [openobex-users] OBEX_EV_REQDONE mode problem in cvs
version

Am Sonntag 13 Januar 2008 schrieb Hendrik Sattler:
> Am Samstag 12 Januar 2008 schrieb Eric Lapuyade:
> > Yes. Once the connection is established, both endpoints can send
> > requests. So OBEX_MODE_SERVER / OBEX_MODE_CLIENT is not even related
to
> > who connects/accept the connection.
>
> Where in the OBEX specs is this stated?
>
> The obex spec actually says:
> "OBEX follows a client/server request-response paradigm for the
> conversation format. The terms client and server refer to the
> originator/receiver of the OBEX connection[...]. Requests are issued
by the
> client (the party that initiates the OBEX connection). Once a request
is
> issued, the client waits for a response from the server before issuing
> another request. The request/response pair is referred to as an
operation."
>
> This paragraph is pretty simple and clear: An OBEX server is not
allowed to
> issue requests. It may be possible to violate the specs but why should
the
> library support that?

That said: Sure you can use OBEX_Request() if you server also wants to
act as 
a client, but it has to use OBEX_Init() first to get another obex_t.

HS

------------------------------------------------------------------------
-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketp
lace
_______________________________________________
Openobex-users mailing list
[email protected]
http://lists.sourceforge.net/lists/listinfo/openobex-users

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Openobex-users mailing list
[email protected]
http://lists.sourceforge.net/lists/listinfo/openobex-users

Reply via email to