Commit Graph

12 Commits

Author SHA1 Message Date
Kevin Clark
5ae0bab247 rb: Add optional timeout argument to Thrift::Socket [THRIFT-74]
Socket.new and UNIXSocket.new both now have a new optional argument: timeout.
There's also a timeout field accessor. This timeout is used when reading or
writing.

Author: Kevin Ballard <kevin@rapleaf.com>


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@678053 13f79535-47bb-0310-9956-ffa450edef68
2008-07-18 21:49:50 +00:00
Kevin Clark
f8ecb02ef4 rb: NonblockingServer: Use a select() loop in the acceptor thread
Using a select() loop with a timeout allows the acceptor thread to be shut down
cleanly under JRuby.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669042 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:20:22 +00:00
Kevin Clark
2ddd8ed40f rb: Implement Thrift::UNIXSocket and Thrift::UNIXServerSocket
In benchmarking it turns out these don't give any noticeable performance boost,
but as I've already written them, somebody may want them for something.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669019 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:18:35 +00:00
Kevin Clark
1067425ef7 rb: Enhance non-blocking read in Socket
Also prevent errors when trying to close a @handle twice


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669010 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:17:30 +00:00
Kevin Clark
1d4b2d87f7 rb: Thrift::Socket should return false from #open? if an error occurred during a read/write (THRIFT-7)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669000 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:16:11 +00:00
Kevin Clark
c67587006f Add optional host argument to ServerSocket
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668997 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:15:45 +00:00
Kevin Clark
c78eeef184 Teach Socket how to read_nonblock
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668996 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:15:36 +00:00
Kevin Clark
6c30dbbb92 Add a few accessors and specs to prepare for the upcoming NonblockingServer
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668995 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:15:25 +00:00
Kevin Clark
ec9106f854 Mark failing tests as pending
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668988 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:14:26 +00:00
Kevin Clark
f98286a8e4 Add failing spec for Socket closing when it has an error (THRIFT-7)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668986 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:14:08 +00:00
Kevin Clark
0d6007c717 Add missing test for ServerSocket
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668982 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:13:27 +00:00
Kevin Clark
3c87129dc0 Spec out Socket and ServerSocket
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668974 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:12:05 +00:00