* [PATCH] android/socket Use 4K buffer for socket handling
@ 2013-12-02 16:06 Andrei Emeltchenko
0 siblings, 0 replies; only message in thread
From: Andrei Emeltchenko @ 2013-12-02 16:06 UTC (permalink / raw)
To: linux-bluetooth
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Make SOCKET_BUFFER define and use 4K instead of 1K.
---
android/socket.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/android/socket.c b/android/socket.c
index 4502e90..98ec3ec 100644
--- a/android/socket.c
+++ b/android/socket.c
@@ -52,6 +52,8 @@
#define SVC_HINT_OBEX 0x10
+#define SOCKET_BUFFER 4096
+
static bdaddr_t adapter_addr;
/* Simple list of RFCOMM server sockets */
@@ -487,7 +489,7 @@ static gboolean sock_stack_event_cb(GIOChannel *io, GIOCondition cond,
gpointer data)
{
struct rfcomm_sock *rfsock = data;
- unsigned char buf[1024];
+ unsigned char buf[SOCKET_BUFFER];
int len, sent;
if (cond & G_IO_HUP) {
@@ -526,7 +528,7 @@ static gboolean sock_rfcomm_event_cb(GIOChannel *io, GIOCondition cond,
gpointer data)
{
struct rfcomm_sock *rfsock = data;
- unsigned char buf[1024];
+ unsigned char buf[SOCKET_BUFFER];
int len, sent;
if (cond & G_IO_HUP) {
--
1.8.3.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-12-02 16:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-02 16:06 [PATCH] android/socket Use 4K buffer for socket handling Andrei Emeltchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).