Commit Graph

66 Commits

Author SHA1 Message Date
Joel Stanley
e8d3e6450e Split up CompletionQueue into CompletionQueue.{Unregistered,Internal} and add Unregistered namespace for Op 2016-06-08 15:29:12 -05:00
Joel Stanley
27a9a6283a Rename unreg operations in Network.GRPC.LowLevel.Call.Unregistered 2016-06-08 15:29:12 -05:00
Joel Stanley
386568463a Split off support for unregistered calls to an *.Unregistered module namespace 2016-06-08 15:29:12 -05:00
Joel Stanley
d46c0c1c94 Distinguish hostnames vs "host:port" strings; minor echo client cleanup (#20)
* Remove explicit host:port parameter from clientRequest

* Save ClientConfig in Client ADT; derive host:port string as needed

* Add Port newtype and endpoint string constructor fn

* Introduce Endpoint newtype for host:port strings; derive them as needed; misc cleanup

* Clean up echo client
2016-06-06 12:54:43 -05:00
Connor Clark
ce56953b24 Various example/benchmarking code (#16)
* initial echo client/server examples

* registered and unregistered versions of the example client

* ignore pyc files

* cpp echo code, flag to build examples

* threaded server example
2016-06-03 10:34:09 -07:00
Joel Stanley
80dd0e0874 fix warnings, stylish-haskell, wibbles 2016-05-25 16:26:28 -07:00
Joel Stanley
a5559cfca4 Move unsafe C bindings unit tests to UnsafeTests module; minor nit-linting 2016-05-24 14:27:15 -07:00
Connor Clark
2ad0465df6 Begin safe low-level Haskell layer (#7)
* grpc_server_request_call

* basic slice functionality

* rename function to emphasize side effects

* add docs

* ByteBuffer function bindings

* replace unsafeCoerce with more specific function, add docs, tests.

* add newtypes for Tag and Reserved void pointers

* manually fix request_registered_call binding

* use nocode keyword to fix Ptr () problems

* decouple copying Slice from freeing slice

* Add time ops

* remove nocode decls

* Start Op module, fix c2hs preprocessing order

* metadata manipulation operations

* metadata free function, test

* helper functions for constructing ops of each type

* bindings for op creation functions

* finish up Op creation functions, implement Op destruction, add docs.

* tweak documentation

* rework Op creation functions to work with an array of ops, for ease of use with grpc_call_start_batch

* forgot to change return types

* wrap hook lines, fix types to op creation functions

* implement part of the payload test

* hideous, but working, end to end test

* bindings for connectivity state checks, split test into two threads

* various cleanup

* rename Core to Unsafe for emphasis, clean up tests more

* begin safe low-level facilities

* begin completion queue and server stuff

* Finish server start/stop, cq start/stop, add tests

* facilities for safely executing op batches

* reorganize LowLevel modules, begin explicit export list

* client functionality, stub payload test, various refactors

* tweak cabal file, add test

* add more documentation

* doc tweaks

* begin refactor to improve CompletionQueue safety

* export only thread-safe CQ functions, add registered call creation and other CQ utilities

* begin refactor to use GRPCIO monad, fix missing push semaphore, fix mem leak in server calls

* switch to explicit Either where needed

* add crashing tests, continue fleshing out serverHandleNormalCall

* fix haddock error, finish first draft of request handling function

* reduce GHC warnings

* non-registered client request helpers

* initial request/response test working

* don't pass tags around; generate where needed

* server call bracket functions

* correct order of semaphore acquisition and shutdown check

* simple debug flag logging, simplify Call type

* fix various registered method issues (but still not working)

* cleanup

* delete old code

* remove old todo

* use MetadataMap synonym pervasively

* more comments

* update TODOs

* tweak safety caveat

* docs tweaks

* improve haddocks

* add casts to eliminate clang warnings, remove unused function

* update options to eliminate cabal warnings

* remove outdated todo

* remove unneeded exports from CompletionQueue

* rename to GRPCIOCallError, re-add create/shutdown exports (needed for Server module)

* newtypes for hosts and method names

* more newtypes

* more debug logging

* Fix flag name collision

* instrument uses of free

* more debug

* switch to STM for completion queue stuff

* reduce warnings

* more debugging, create/destroy call tests

* refactor, fix failure cleanup for server call creation. More tests passing.

* formatting tweaks
2016-05-24 13:34:50 -07:00
Connor Clark
90a527f4e0 Finish up bindings to most core gRPC functions (#1)
* grpc_server_request_call

* basic slice functionality

* rename function to emphasize side effects

* add docs

* ByteBuffer function bindings

* replace unsafeCoerce with more specific function, add docs, tests.

* add newtypes for Tag and Reserved void pointers

* manually fix request_registered_call binding

* use nocode keyword to fix Ptr () problems

* decouple copying Slice from freeing slice

* Add time ops

* remove nocode decls

* Start Op module, fix c2hs preprocessing order

* metadata manipulation operations

* metadata free function, test

* helper functions for constructing ops of each type

* bindings for op creation functions

* finish up Op creation functions, implement Op destruction, add docs.

* tweak documentation

* rework Op creation functions to work with an array of ops, for ease of use with grpc_call_start_batch

* forgot to change return types

* wrap hook lines, fix types to op creation functions

* implement part of the payload test

* hideous, but working, end to end test

* bindings for connectivity state checks, split test into two threads

* various cleanup

* rename Core to Unsafe for emphasis, clean up tests more

* add requested comment

* remove slice_unref binding, use sliceFree when converting buffer to bytestring
2016-05-13 09:12:37 -07:00
Connor Clark
6ad6a61c33 add channel create call 2016-04-20 16:02:53 -07:00
Connor Clark
20693583d9 update to work with latest grpc 2016-04-19 10:20:02 -07:00
Alois Cochard
17303329fb Add more GRPC core bindings with wrapper functions infrastructure. 2015-03-05 19:02:25 +01:00
Alois Cochard
9219b498a9 Add Network.GRPC.Constants. 2015-03-03 09:30:11 +01:00
Alois Cochard
3d4cad3279 Add Network.GRPC.Time module with Timespec binding. 2015-03-02 15:48:18 +01:00
Alois Cochard
27e90f47bb Use default include location instead of custom path.
Which resolve nicely when the package is installed using the distribution.
2015-03-02 15:24:38 +01:00
Alois Cochard
3048b035c8 Initial commit. 2015-02-27 18:14:32 +01:00