Commit Graph

260 Commits

Author SHA1 Message Date
Craig Tiller e7163ab625 Expand comment 2015-02-17 20:46:08 -08:00
Craig Tiller d251ab9e71 Attempt to better explain secure server creation 2015-02-17 17:22:14 -08:00
Craig Tiller a0e34a0b90 Expand init/destroy documentation 2015-02-17 17:06:23 -08:00
Craig Tiller 29f2b219a8 Add channel argument documentation 2015-02-17 17:01:42 -08:00
Craig Tiller aea2fc053d Fix shutdown semantics.
Document what they should be, ensure they're triggered, and fix what was broken.
2015-02-17 16:54:53 -08:00
Craig Tiller ab294db744 Add some comments 2015-02-17 15:00:19 -08:00
Yang Gao f2c0ca4c62 Add setter to override authority header on ClientContext 2015-02-17 10:21:31 -08:00
Craig Tiller 573523f127 clang-format 2015-02-17 07:38:26 -08:00
Craig Tiller cfdef957ad Merge github.com:grpc/grpc into c++api 2015-02-16 11:13:22 -08:00
Nathaniel Manista 6d41a054f9 Documentation tweaks in grpc.h. 2015-02-16 02:12:48 +00:00
Craig Tiller 771fefb41b Merge pull request #18 from yang-g/c++api
Add missing APIs and a first metadata test, and test passes
2015-02-13 16:30:49 -08:00
Yang Gao 406b32f663 Add missing APIs and a first metadata test, and test passes 2015-02-13 16:25:33 -08:00
Nicolas "Pixel" Noble fbdd7abdca Cleaning up our posix definition / usage.
-) Let's not use _POSIX_SOURCE. It usually implies too much C99. _BSD_SOURCE would be the right thing to do here.
-) _BSD_SOURCE is getting deprecated by glibc, so we also have to define _DEFAULT_SOURCE under Linux.
-) accept4 and eventfd arn't as old as we may think; let's detect for it.
-) stdint.h interferes with all these definitions if included too early; let's move it down.
2015-02-14 00:23:19 +01:00
Craig Tiller 8c22f05f21 Minor compile fix 2015-02-13 15:11:57 -08:00
Yang Gao 005f18a6a1 change ServerAsyncReader API and add a simple clientstreaming test, it passes 2015-02-13 10:22:33 -08:00
Yang Gao 0c7aafaa0c change AddRecvMessage signature 2015-02-12 22:51:38 -08:00
Yang Gao c17e861aa0 more nullptr for got_message 2015-02-12 22:22:23 -08:00
Craig Tiller 0220cf14b0 Add end2end async unary single threaded test (compiles) 2015-02-12 17:39:26 -08:00
Craig Tiller c645306b64 Fixes 2015-02-12 17:32:57 -08:00
Craig Tiller 0d1f67f4e5 Merge github.com:google/grpc into c++api
Conflicts:
	Makefile
2015-02-12 17:14:30 -08:00
Yang Gao 31150f01db implement async unary call 2015-02-12 16:44:00 -08:00
Yang Gao 555a0e9e77 Merge branch 'c++api' of github.com:ctiller/grpc into c++api 2015-02-12 16:12:36 -08:00
Yang Gao cbcc977857 fix sync unary call with metadata pieces 2015-02-12 16:09:08 -08:00
Craig Tiller 6b6c3dd2c9 Merge pull request #500 from nicolasnoble/secure_getenv
Not all Linuxes are equal, and secure_getenv isn't always there.
2015-02-12 16:07:28 -08:00
Craig Tiller ec3257c120 Fix end2end leaks 2015-02-12 15:59:43 -08:00
Craig Tiller 3d20c5e8c6 Merge pull request #13 from yang-g/c++api
Make codegen generate async client calls
2015-02-12 15:25:53 -08:00
Yang Gao 068c85b21c make codegen generate async client calls 2015-02-12 15:21:24 -08:00
Craig Tiller d4ebeeb7fb Async server streaming 2015-02-12 14:57:17 -08:00
Craig Tiller 3d6ceb6461 Async server dispatch 2015-02-12 14:33:54 -08:00
Yang Gao 5705fe3fca Add a cq argument in ClientAsync ctor and give it to the Call 2015-02-12 14:30:34 -08:00
Craig Tiller 984b09087f Merge branch 'c++api' of github.com:ctiller/grpc into c++api 2015-02-12 14:11:25 -08:00
Craig Tiller 1c9a2a91ca Async API progress 2015-02-12 14:10:25 -08:00
Yang Gao 0b18a8bd4c typo fix 2015-02-12 13:37:33 -08:00
Yang Gao 106906924f implement ServerAsyncResponseWriter for unary call 2015-02-12 13:27:14 -08:00
Yang Gao 9a2743a897 Merge branch 'c++api' of github.com:ctiller/grpc into c++api 2015-02-12 12:05:47 -08:00
Yang Gao a38feb9be7 Implement async streaming APIs 2015-02-12 12:05:20 -08:00
Craig Tiller 8c8d0aa1d8 Async API progress 2015-02-12 11:38:36 -08:00
Yang Gao 424bc92e37 implement ClientAsyncX api 2015-02-12 10:24:39 -08:00
Craig Tiller 2e70dc18c6 Merge pull request #10 from yang-g/c++api
Put in SendInitialMetadata and WaitForInitialMetadata in some places.
2015-02-12 09:49:24 -08:00
Yang Gao 02a6e3a76a Merge branch 'c++api' of github.com:ctiller/grpc into c++api 2015-02-12 09:41:32 -08:00
Yang Gao ea222b2001 resolve comments, the context_ member needs protection for thread safety 2015-02-12 09:38:51 -08:00
Craig Tiller 20bc56d890 Multi-completion-queue-server
Allow binding a different completion queue to each registered method.
This will allow multiplexing for the C++ server between sync & async
methods more easily.
2015-02-12 09:02:56 -08:00
Yang Gao 3ccdbe9bcc Make SendInitialMetadata work. 2015-02-11 23:56:30 -08:00
Yang Gao b492f06c9d Add SendInitialMetadata() to server streaming interfaces 2015-02-11 23:43:20 -08:00
Yang Gao fd7199f64e Add client side WaitForInitialMetadata for streaming. 2015-02-11 23:14:49 -08:00
Craig Tiller fada7d43b1 Add some documentation 2015-02-11 23:03:55 -08:00
Craig Tiller a847a8f8bc Finish streaming, lame client 2015-02-11 21:20:25 -08:00
Craig Tiller 0156752a66 Some streaming progress 2015-02-11 21:08:49 -08:00
Craig Tiller 504bd331ab Make sure we get a close before stopping the server 2015-02-11 20:34:33 -08:00
Nicolas Noble d3ae976ac0 Not all Linuxes are equal, and secure_getenv isn't always there.
Let's include <features.h> to figure out if the system we're on is supporting secure_getenv, and adapt accordingly.
I suspect we might want to do the same with epoll, as it was added to glibc in 2.3.2, and eventfd has been added to glibc in 2.8.
2015-02-12 03:38:44 +01:00
Craig Tiller d9dd8fee04 Merge github.com:grpc/grpc into c++api 2015-02-11 18:19:24 -08:00
Craig Tiller 39550b6c4c Merge pull request #9 from yang-g/c++api
Add trailing metadata to client context and use it.
2015-02-11 16:50:09 -08:00
Craig Tiller 47a573602a Fix ownership 2015-02-11 16:31:45 -08:00
Yang Gao 968ca530b2 Add trailing metadata to client context and use it. 2015-02-11 16:23:47 -08:00
Craig Tiller 9dcb0f8e1d Send initial metadata 2015-02-11 15:36:31 -08:00
Yang Gao 2382293226 Make it compile 2015-02-11 13:59:25 -08:00
Yang Gao 1464bc175d resolve conflict 2015-02-11 13:48:28 -08:00
Yang Gao f1258c4951 save before the change 2015-02-11 13:44:11 -08:00
Craig Tiller bb5227fc39 Allow server to hook calls also, fix crash 2015-02-11 13:34:48 -08:00
David Klempner fdd42cfa4e Actually include the port_platform.h epoll change too 2015-02-11 13:34:04 -08:00
Craig Tiller a5c0e7bc46 Initial metadata fix 2015-02-11 13:14:49 -08:00
David Klempner 53eae7a3e0 Merge branch 'master' into epoll 2015-02-11 13:07:19 -08:00
Craig Tiller 3b29b566a2 Just use one completion queue per server for delivering completions
This simplifies (drastically) the polling story, although will slightly
complicate mixing sync & async servers - but we're not there yet.
2015-02-11 12:58:46 -08:00
Yang Gao a5e2a03fec Merge branch 'c++api' of github.com:ctiller/grpc into c++api 2015-02-11 11:45:33 -08:00
Yang Gao 99b07d1ea7 fix conflict 2015-02-11 11:45:22 -08:00
Craig Tiller 854a30c73a More implementation 2015-02-11 11:44:10 -08:00
Yang Gao eb8e7cd922 Implement FinalizeResult 2015-02-11 11:43:40 -08:00
Craig Tiller 04c8ff0245 Fix FinalizeResult signature 2015-02-11 11:01:07 -08:00
Craig Tiller b84aab7922 Merge branch 'c++api' of github.com:ctiller/grpc into c++api 2015-02-11 10:51:23 -08:00
Craig Tiller c416577636 Server progress 2015-02-11 10:51:04 -08:00
Yang Gao 6d6b90376b Release write buffer in FinalizeResult 2015-02-11 10:19:20 -08:00
Craig Tiller 2dac79770e Merge github.com:grpc/grpc into c++api 2015-02-11 08:10:49 -08:00
Craig Tiller 187994e0fd Merge pull request #448 from nicolasnoble/grpc-win32
Windows port of iomgr.
2015-02-11 08:09:03 -08:00
Craig Tiller 1e67aeed22 Merge pull request #5 from yang-g/c++api
Implement FillOps
2015-02-11 07:51:45 -08:00
Yang Gao d5a04bdc6e Implement FillOps 2015-02-11 00:04:32 -08:00
David Klempner baced4def0 Epoll based multipoller
This is a multipoller based on epoll rather than poll.

Note that this implementation is aimed at correctness rather than
performance, although it should immediately have better scalability to
large numbers of FDs, both due to epoll's O(1) sized API and due to not
needing to wake up polling threads to do interest set changes.

One notable difference here is that we directly attach a wakeup fd
rather than using the freelisting kick mechanism that the poll() based
implementations use, because modifying the epoll set to use a different
kick fd each time isn't free.
2015-02-10 20:12:15 -08:00
Craig Tiller cbd0485088 Simplify server ready for async path 2015-02-10 17:39:54 -08:00
Craig Tiller 8e8fd89faf Allow two completion queues on request call
One for the new rpc notification, the other is bound to the new call.
This will make async c++ soooo much easier.
2015-02-10 17:02:08 -08:00
Craig Tiller d608892313 Merge pull request #4 from yang-g/c++api
call implementation part 1
2015-02-10 14:29:29 -08:00
Yang Gao 7eb7d75c51 call implementation before the meeting 2015-02-10 14:23:15 -08:00
Craig Tiller 24be0f79e2 Rewrite server request startup path
Stub in registered methods, cleanup to the point I understand this code
again.
2015-02-10 14:04:22 -08:00
Craig Tiller 20f4af2e36 Move call.h -> impl/call.h 2015-02-10 09:52:15 -08:00
Craig Tiller 9d972e4628 Merge github.com:grpc/grpc into c++api 2015-02-10 09:36:08 -08:00
Craig Tiller f9a06a78cb Remove temp code 2015-02-09 22:14:52 -08:00
Craig Tiller 549a74daa8 Rephrase async streaming methods
To ensure that the CallOpBuffers stay alive until completion.
2015-02-09 22:13:44 -08:00
Craig Tiller 0a5bcbc632 Add some documentation 2015-02-09 21:39:04 -08:00
Craig Tiller 80e00a8c63 Stub out unary call wrapper 2015-02-09 20:54:25 -08:00
Craig Tiller de917062ec Refine completion queue 2015-02-09 17:15:03 -08:00
Craig Tiller 7630205bdf Add missing ifdef 2015-02-09 16:47:40 -08:00
Nicolas "Pixel" Noble 811b07876c Merge branch 'master' of github.com:google/grpc into grpc-win32 2015-02-10 01:26:37 +01:00
Craig Tiller 5319164875 Cleanup 2015-02-09 16:15:23 -08:00
Craig Tiller 8de8c646c5 Merge pull request #3 from yang-g/c++api
more implementation and all async signatures
2015-02-09 16:12:36 -08:00
Craig Tiller b470169252 Remove more unnecessary files 2015-02-09 16:12:00 -08:00
Yang Gao 75ec2b191c more implementation and all async signatures 2015-02-09 16:03:41 -08:00
Craig Tiller 40fcdaff0a Remove stream_context 2015-02-09 15:43:34 -08:00
Craig Tiller 1d2e21962e Server progress 2015-02-09 15:25:21 -08:00
Craig Tiller 061754a483 Cleanup some cruft 2015-02-09 14:56:49 -08:00
Craig Tiller 1801e420de Fix include paths 2015-02-09 14:27:35 -08:00
Craig Tiller 9407a3e807 Merge pull request #2 from yang-g/c++api
ServerReader impl with new API
2015-02-09 14:25:06 -08:00
Yang Gao 8a3bbb5c55 ServerReader with new API 2015-02-09 14:10:59 -08:00