Return-Path: Message-ID: <9e3a30280602261729u52e8b48ap5a90d422e4ddc44@mail.gmail.com> From: "Deniz Demir" To: bluez-devel@lists.sourceforge.net MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Subject: [Bluez-devel] RFCOMM Server: accept does not block Sender: bluez-devel-admin@lists.sourceforge.net Errors-To: bluez-devel-admin@lists.sourceforge.net Reply-To: bluez-devel@lists.sourceforge.net List-Unsubscribe: , List-Id: BlueZ development List-Post: List-Help: List-Subscribe: , List-Archive: Date: Sun, 26 Feb 2006 17:29:09 -0800 Hi, I want to run a small rfcomm server, however it does not block on accept, and returns immediately with -1 as socket descriptor (last line prints -1 right away). I have the following code: // allocate socket s =3D socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM); // bind socket to port 1 of the first available // local bluetooth adapter loc_addr.rc_family =3D AF_BLUETOOTH; loc_addr.rc_bdaddr =3D *BDADDR_ANY; loc_addr.rc_channel =3D (uint8_t) 1; bind(s, (struct sockaddr *)&loc_addr, sizeof(loc_addr)); // put socket into listening mode listen(s, 1); // accept one connection client =3D accept(s, (struct sockaddr *)&rem_addr, &opt); printf("client: %d \n", client); I expected it would block on accept function until a connection request came in. I appreciate any comments. Thanks, Deniz ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Bluez-devel mailing list Bluez-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-devel