aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/csharp/GrpcCore/Internal/ServerSafeHandle.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/csharp/GrpcCore/Internal/ServerSafeHandle.cs')
-rw-r--r--src/csharp/GrpcCore/Internal/ServerSafeHandle.cs34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/csharp/GrpcCore/Internal/ServerSafeHandle.cs b/src/csharp/GrpcCore/Internal/ServerSafeHandle.cs
index 82587c88b7..391a1acd01 100644
--- a/src/csharp/GrpcCore/Internal/ServerSafeHandle.cs
+++ b/src/csharp/GrpcCore/Internal/ServerSafeHandle.cs
@@ -10,31 +10,31 @@ namespace Google.GRPC.Core.Internal
/// </summary>
internal sealed class ServerSafeHandle : SafeHandleZeroIsInvalid
{
- [DllImport("grpc_csharp_ext.dll", EntryPoint = "grpc_server_request_call_old")]
- static extern GRPCCallError grpc_server_request_call_old_CALLBACK(ServerSafeHandle server, [MarshalAs(UnmanagedType.FunctionPtr)] EventCallbackDelegate callback);
+ [DllImport("grpc_csharp_ext.dll", EntryPoint = "grpcsharp_server_request_call_old")]
+ static extern GRPCCallError grpcsharp_server_request_call_old_CALLBACK(ServerSafeHandle server, [MarshalAs(UnmanagedType.FunctionPtr)] EventCallbackDelegate callback);
[DllImport("grpc_csharp_ext.dll")]
- static extern ServerSafeHandle grpc_server_create(CompletionQueueSafeHandle cq, IntPtr args);
+ static extern ServerSafeHandle grpcsharp_server_create(CompletionQueueSafeHandle cq, IntPtr args);
// TODO: check int representation size
[DllImport("grpc_csharp_ext.dll")]
- static extern int grpc_server_add_http2_port(ServerSafeHandle server, string addr);
+ static extern int grpcsharp_server_add_http2_port(ServerSafeHandle server, string addr);
// TODO: check int representation size
[DllImport("grpc_csharp_ext.dll")]
- static extern int grpc_server_add_secure_http2_port(ServerSafeHandle server, string addr);
+ static extern int grpcsharp_server_add_secure_http2_port(ServerSafeHandle server, string addr);
[DllImport("grpc_csharp_ext.dll")]
- static extern void grpc_server_start(ServerSafeHandle server);
+ static extern void grpcsharp_server_start(ServerSafeHandle server);
[DllImport("grpc_csharp_ext.dll")]
- static extern void grpc_server_shutdown(ServerSafeHandle server);
+ static extern void grpcsharp_server_shutdown(ServerSafeHandle server);
- [DllImport("grpc_csharp_ext.dll", EntryPoint = "grpc_server_shutdown_and_notify")]
- static extern void grpc_server_shutdown_and_notify_CALLBACK(ServerSafeHandle server, [MarshalAs(UnmanagedType.FunctionPtr)] EventCallbackDelegate callback);
+ [DllImport("grpc_csharp_ext.dll", EntryPoint = "grpcsharp_server_shutdown_and_notify")]
+ static extern void grpcsharp_server_shutdown_and_notify_CALLBACK(ServerSafeHandle server, [MarshalAs(UnmanagedType.FunctionPtr)] EventCallbackDelegate callback);
[DllImport("grpc_csharp_ext.dll")]
- static extern void grpc_server_destroy(IntPtr server);
+ static extern void grpcsharp_server_destroy(IntPtr server);
private ServerSafeHandle()
{
@@ -43,38 +43,38 @@ namespace Google.GRPC.Core.Internal
public static ServerSafeHandle NewServer(CompletionQueueSafeHandle cq, IntPtr args)
{
// TODO: also grpc_secure_server_create...
- return grpc_server_create(cq, args);
+ return grpcsharp_server_create(cq, args);
}
public int AddPort(string addr)
{
// TODO: also grpc_server_add_secure_http2_port...
- return grpc_server_add_http2_port(this, addr);
+ return grpcsharp_server_add_http2_port(this, addr);
}
public void Start()
{
- grpc_server_start(this);
+ grpcsharp_server_start(this);
}
public void Shutdown()
{
- grpc_server_shutdown(this);
+ grpcsharp_server_shutdown(this);
}
public void ShutdownAndNotify(EventCallbackDelegate callback)
{
- grpc_server_shutdown_and_notify_CALLBACK(this, callback);
+ grpcsharp_server_shutdown_and_notify_CALLBACK(this, callback);
}
public GRPCCallError RequestCall(EventCallbackDelegate callback)
{
- return grpc_server_request_call_old_CALLBACK(this, callback);
+ return grpcsharp_server_request_call_old_CALLBACK(this, callback);
}
protected override bool ReleaseHandle()
{
- grpc_server_destroy(handle);
+ grpcsharp_server_destroy(handle);
return true;
}
}