From 80545b94312d9766f74fe5ebe84b820adfe7b6da Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Wed, 11 Nov 1998 01:31:59 +0000 Subject: [PATCH] reduced socket buffer size --- src/cas/io/bsdSocket/casDGIntfIO.cc | 8 +++++ src/cas/io/bsdSocket/casStreamIO.cc | 12 ++++++- src/rsrv/camsgtask.c | 8 +++++ src/rsrv/cast_server.c | 49 ++++++++++++++--------------- 4 files changed, 51 insertions(+), 26 deletions(-) diff --git a/src/cas/io/bsdSocket/casDGIntfIO.cc b/src/cas/io/bsdSocket/casDGIntfIO.cc index 5bdd0a300..08ca2fd02 100644 --- a/src/cas/io/bsdSocket/casDGIntfIO.cc +++ b/src/cas/io/bsdSocket/casDGIntfIO.cc @@ -95,6 +95,13 @@ caStatus casDGIntfIO::init(const caNetAddr &addr, unsigned connectWithThisPortIn return S_cas_internal; } + /* + * some concern that vxWorks will run out of mBuf's + * if this change is made + * + * joh 11-10-98 + */ +#if 0 { /* * @@ -116,6 +123,7 @@ caStatus casDGIntfIO::init(const caNetAddr &addr, unsigned connectWithThisPortIn "CAS: unable to set cast socket size\n"); } } +#endif /* * release the port in case we exit early. Also if diff --git a/src/cas/io/bsdSocket/casStreamIO.cc b/src/cas/io/bsdSocket/casStreamIO.cc index 2e7ba0588..8944c0b1d 100644 --- a/src/cas/io/bsdSocket/casStreamIO.cc +++ b/src/cas/io/bsdSocket/casStreamIO.cc @@ -5,6 +5,9 @@ // // // $Log$ +// Revision 1.16 1998/06/16 02:35:52 jhill +// use aToIPAddr and auto attach to winsock if its a static build +// // Revision 1.15 1998/05/29 20:08:21 jhill // use new sock ioctl() typedef // @@ -114,7 +117,13 @@ caStatus casStreamIO::init() return S_cas_internal; } - + /* + * some concern that vxWorks will run out of mBuf's + * if this change is made + * + * joh 11-10-98 + */ +#if 0 /* * set TCP buffer sizes to be synergistic * with CA internal buffering @@ -141,6 +150,7 @@ caStatus casStreamIO::init() ca_printf("CAS: SO_RCVBUF set failed\n"); return S_cas_internal; } +#endif this->sockState = casOnLine; diff --git a/src/rsrv/camsgtask.c b/src/rsrv/camsgtask.c index 2ac2c0393..2ef2e54b6 100644 --- a/src/rsrv/camsgtask.c +++ b/src/rsrv/camsgtask.c @@ -129,6 +129,13 @@ FAST int sock; return ERROR; } + /* + * some concern that vxWorks will run out of mBuf's + * if this change is made + * + * joh 11-10-98 + */ +#if 0 /* * set TCP buffer sizes to be synergistic * with CA internal buffering @@ -169,6 +176,7 @@ FAST int sock; close(sock); return ERROR; } +#endif /* * performed in two steps purely for diff --git a/src/rsrv/cast_server.c b/src/rsrv/cast_server.c index 99e8e2f73..b5ee0e3e0 100644 --- a/src/rsrv/cast_server.c +++ b/src/rsrv/cast_server.c @@ -138,32 +138,31 @@ int cast_server(void) taskSuspend(taskIdSelf()); } - { - /* - * - * this allows for faster connects by queuing - * additional incomming UDP search frames - * - * this allocates a 32k buffer - * (uses a power of two) - */ - int size = 1u<<15u; - status = setsockopt( - IOC_cast_sock, - SOL_SOCKET, - SO_RCVBUF, - (char *)&size, - sizeof(size)); - if (status<0) { + /* + * some concern that vxWorks will run out of mBuf's + * if this change is made + * + * joh 11-10-98 + */ +#if 0 + { + /* + * + * this allows for faster connects by queuing + * additional incomming UDP search frames + * + * this allocates a 32k buffer + * (uses a power of two) + */ + int size = 1u<<15u; + status = setsockopt (IOC_cast_sock, SOL_SOCKET, + SO_RCVBUF, (char *)&size, sizeof(size)); + if (status<0) { logMsg("CAS: unable to set cast socket size\n", - NULL, - NULL, - NULL, - NULL, - NULL, - NULL); - } - } + NULL, NULL, NULL, NULL, NULL, NULL); + } + } +#endif /* Zero the sock_addr structure */ bfill((char *)&sin, sizeof(sin), 0);