All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bluez-users] closing a connection: timing
@ 2005-03-13 17:31 Marco Trudel
  2005-03-14 10:24 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: Marco Trudel @ 2005-03-13 17:31 UTC (permalink / raw)
  To: bluez-users

Hello everybody

this is my "server-code":

int client = accept(sock, (struct sockaddr *)&addr, &alen))
char out[] = "200 100";
send(client, out, strlen(out), 0);
// sleep(2);
close(client);


I wrote a little client with the avetana library on my laptop and i'm able 
to receive the message "200 100".

I tested it with my mobile phone (with exactly the same code as with the 
avetana library). Here I'm unable to receive the data. as soon as i try to 
open the inputstream, an exception ("connection already closed") is thrown.
If I uncommend the sleep, it works an i get "200 100".
I now don't know where the source of the problem could be. Do I miss 
something important? Mobile Phone bug?


btw, I tested it with the bluetooth-terminal from kde and only receive "200 
10". -> where is the last "0"?

kind regards
Marco Trudel


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-03-14 10:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-13 17:31 [Bluez-users] closing a connection: timing Marco Trudel
2005-03-14 10:24 ` Marcel Holtmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.