����λ�ã���ҳ > �����̳� > �̳� > IceRPC֮��������ַ��TLS�İ�ȫ��->���ֵ�RPC
�������� .Net 8.0 �µ���RPC �ܸ��˰�������������IceRPC֮��������ַ��TLS�İ�ȫ��->���ֵ�RPC, ���������������Ѳ�����ã�����ֵij������硣 ��������ַ ServerAddress �˽��������ַ�ĸ�����﷨�� �﷨ ��������ַURI���������﷨: protocol:/
.Net 8.0 �µ���RPC
�ܸ��˰�������������IceRPC֮��������ַ��TLS�İ�ȫ��->���ֵ�RPC, ���������������Ѳ�����ã�����ֵij������硣
ServerAddress
�˽��������ַ�ĸ�����﷨��
��������ַ
URI
���������﷨:
protocol://host[:port][?name=value][&name=value...]
protocol
Ð�� (URI����)��Ŀǰ֧��
ice
��
icerpc
host
DNS ���� �� IP ��ַ
port
�˿ں�; δָ��ʱ��Ĭ�϶˿�Ϊ 4061
ice
�� 4062
icerpc
��������ַ URI ������п�·����û��Ƭ�Ρ��������в�ѯ��������Щ����ͨ�����ض��ڴ���ġ�
��ѯ��������
transport
ָ���ײ㴫������ơ������Ӧ�ó���ʹ�õ������䣬�����˴���������Ϊ���ǿ���ʹ�õ�Ψһ���䡣 ��ˣ��ڷ�������ַ��ʡ�Դ���
transport
�Ǻܳ����ġ�
C# �У��ṹ��
ServerAddress
�Ƿ�������ַ URI �Ľ�������֤�����ڱ���URI��Ϣ�ȡ�
�ͻ������ӵ���Ҫ�����Ƿ������ĵ�ַ�� �����߿ͻ���������ε����������DNS ��������Щ��������ַ���Ǻܳ����ġ�
����:
��������ַ | ˵�� |
---|---|
icerpc://hello.zeroc.com
|
ʹ��
icerpc
Ð�����ӵ��˿� 4062 �ϵ�
hello.zeroc.com
�� δָ���ײ㴫�䡣
|
icerpc://192.168.100.10:10000?transport=quic
|
ʹ�� QUIC �ϵ�
icerpc
Ð�飬���Ӷ˿� 10000 �ϵ�
192.168.100.10
Ip��ַ
|
ice://hello.zeroc.com
|
ʹ�� ice Ð�����Ӷ˿� 4061 �ϵ�
hello.zeroc.com
��ַ
|
ָ������������ʱ��Ҫ�����ķ�������ַ��
�����ָ����������ַ��Ĭ��ֵΪ
icerpc://[::0]
������ζ�ţ�����Ĭ��
icerpc
�˿� (4062) �����нӿ��ϵ�
icerpc
���ӡ�
����������ʱ����������ַ������������
[::0]
������ͨ���ip��ַ�������ǵ�ǰϵͳ���ض��ӿڵ�ip��ַ��
����˿ں�ָ�� 0������ϵͳ���Զ���������ݷ�Χ�ڵĶ˿ںš���Ϊ������������� tcp �� udp �˿� 0��
������һЩʾ��:
��������ַ | ˵�� |
---|---|
icerpc://192.168.100.10
|
ʹ��Ĭ��
icerpc
�˿� 4062��������
192.168.100.10
�����Ľӿ��ϵ�
icerpc
���ӡ�
|
icerpc://[::0]:0
|
�������нӿ��ϵ�
icerpc
���ӣ�����ϵͳ�Զ�ѡ��Ҫʹ�õĶ˿ںš�
|
ice://0.0.0.0:10000
|
10000 �˿��� IPv4 ��ַ�����нӿ��ϼ��� ice ���ӡ� |
C# �У� ���ڷ�������ַ��ָ���˿� 0 ʱ��
Listen
�᷵��һ����������ַ�� ���а��� OS ѡ��Ķ˿ںţ�
using IceRpc;
await using var server = new Server(...,new Uri("icerpc://[::1]:0"));
ServerAddress actualServerAddress = server.Listen();
Console.WriteLine($"server is now listening on {actualServerAddress}"); // shows actual port
// then somehow share this server address with the clients
�˽����ʹ��TLS��������
Ice
��
icerpc
Ð��Ȱ�ȫҲ���Dz���ȫ,��Ϊʹ�� TLS ����ͨ�ţ��ǵײ㴫������Ρ�
icerpc
Ð��û������
https
"s"�仯,Ҳû�����ڰ�ȫ
icerpc
���ӵĶ��ذ�ȫ�˿ڡ� ��������������ַ
icerpc://hello.zeroc.com
ʱ, ���Կ������������ڼ���Ĭ�ϵ� icerpc �˿ڣ����޷��ж����ӵ��÷����������ӣ���ʹ�����ִ��䣬�Լ��ô����Ƿ�ʹ����
TLS
��
Quic
����Ð�飬ʼ���ǰ�ȫ�ġ� ������ͻ�����������Ϊʹ��
Quic
,������ӽ�ʹ��
TLS
��
����:
// Always uses TLS.
await using var connection = new ClientConnection(
"icerpc://hello.zeroc.com",
multiplexedClientTransport: new QuicClientTransport());
ͬ�����߼�Ҳ�����ڷ�����:���������������Ϊʹ��
Quic
,��÷��������ܵ��κ����Ӷ���ʹ��
TLS
��
�� C# ��,��ҪΪ�κ�ʹ��
Quic
�ķ�����ָ��
TLS
���ã��ر���
X.509
֤�顣
����:
// SslServerAuthenticationOptions is required with QuicServerTransport.
await using var server = new Server(
new Chatbot(),
new SslServerAuthenticationOptions
{
ServerCertificate = new X509Certificate2("server.p12")
},
multiplexedServerTransport: new QuicServerTransport());
Tcp
�������ʹ��,Ҳ���Բ�ʹ��
TLS
�������Ϊ
Tcp
�����ͻ�������ʱָ��
TLS
����,������ӽ�ʹ��
TLS
�������ָ��
TLS
���ã����ӽ�����ʹ��
TLS
��
�� C# ��,�ÿͻ���
TLS
������
SslClientAuthenticationOptions
�����ṩ������:
// The default multiplexed transport for icerpc is tcp (implemented by SlicClientTransport over TcpClientTransport).
// This connection does not use TLS since we don't pass a SslClientAuthenticationOptions parameter.
await using var plainTcpConnection = new ClientConnection("icerpc://hello.zeroc.com");
// We pass a non-null SslClientAuthenticationOptions so the connection uses TLS.
await using var secureTcpConnection = new ClientConnection(
"icerpc://hello.zeroc.com",
new SslClientAuthenticationOptions());
����
Tcp
�ķ�������˵����һ���ġ�����ڴ����˷�����ʱ��ָ��
TLS
������������������
TLS
���������ӡ� ����ڴ����˷�����ʱδָ�� TLS ���ã���������������������ܼ򵥵� tcp ���ӡ�
ice
)
Ice
��������ַ����ָ��ssl���䣬����
ice://hello.zeroc.com?transport=ssl
. ����
Ice
�ض���
ssl
������
tcp
������ͬ������ʼ�հ�ȫ�����ⷽ�棬
ssl
����
quic
��
����:
// Uses the default client transport, TcpClientTransport.
await using var connection = new ClientConnection("ice://hello.zeroc.com?transport=ssl");
�൱��:
await using var connection = new ClientConnection(
"ice://hello.zeroc.com?transport=tcp",
new SslClientAuthenticationOptions());
ssl
���������������
Ice
:
Ice
Ӧ�ó�������ȫ���ӵı�׼��ʽ��ʹ�þ���
ssl
��������ַ�Ĵ�����
IceRPC
+
Slice
�������
ssl
��������ַ�ķ����ַʱ,
ssl
���䲶�����Ϣ("��Ҫ
TLS
")��ȷ���ͻ����ڵ��ô˷����ַʱ������ȫ���ӡ�
����
Ice
,tcp
������ζ��"��ʹ��TLS
". ����IceRPC
,tcp
������ζ����ͨtcp
��tcp
+tls
,����ȡ����TLS
���á�
Icerpc
Ð��,�ͻ��˺ͷ���������������ͬ��
TLS
��������,���Ҵ���
transport=tcp
�� icerpc ��������ַ,������ָ����������Ҫ
TLS
��
���ڲ��Ե�
coloc
���䣬��֧��
TLS
�����ʹ��
coloc
ָ�� TLS ����,���յ�����
// Does not work: can't get a TLS connection with a transport that doesn't support TLS.
await using var connection = new ClientConnection(
"icerpc://colochost",
new SslClientAuthenticationOptions()
multiplexedClientTransport: new SlicClientTransport(colocClientTransport));
ʹ��Blender���ɳ���ģ��
�Ķ�ȫ����������ERA5�����ط���
�Ķ�Xpath���������﷨
�Ķ�����ѧϰ�������繹�����£�
�Ķ���ΪMateƷ��ʢ�䣺HarmonyOS NEXT�ӳ�����Ϸ���ܵõ�����ͷ�
�Ķ�ʵ�ֶ��󼯺���DataTable���໥ת��
�Ķ�Ӳ�̵Ļ���֪ʶ��ѡ��ָ��
�Ķ�������й��ƶ��ı�ͼ��ײ�
�Ķ�����NEXTԪ�����������ѿ����ϼ���Ʒ
�Ķ��ᳲ���С������������Ƽ��رշ���
�Ķ������ArcMap�����н���դ��ͼ���ز�������
�Ķ��㷨�����ݽṹ 1 - ģ��
�Ķ���Ѷ�����߿ͷ���Ӫ��ϵͳ����
�Ķ���Ѷ��Ƶҹ��ģʽ���ý̳�
�Ķ����ں���NEXT��Ѫ���Ŵ���������������
�Ķ�5. Spring Cloud OpenFeign ����ʽ WebService �ͻ��˵ij���ϸʹ��
�Ķ�Java����ģʽ����̬�����Ͷ�̬�����ĶԱȷ���
�Ķ�Win11�ʼDZ����Զ�����Ӧ�õ���ɫ����ʾ����
�Ķ�˼�� V1.5.6 ��׿��
��ս�귨 V7.5.0 ��׿��
У��������������׵������� V1.0 ��׿��
��˸֮�� V1.9.7 ��׿��
������Ե����� v1.0.4 ��׿��
������֮ŠV5.2.3 ��׿��
��������������Դ V1.0 ��׿��
���֮Ϣ V1.0 ��׿��
��ħ������������䣩 V1.0 ��׿��
���ں�������ϵ�����������������վ�����������������Ƽ�����
Ƶ�� ����Ƶ��������ר������������׿�������app����
�Ƽ� ��Ô���������°��������ܿ������ز���
���� ����ɫ������������ ���������ս������������
ɨ��ά�����������ֻ��汾��
ɨ��ά����������΢�Ź��ںţ�
��վ�������������������ϴ��������ַ���İ�Ȩ���뷢�ʼ�[email protected]
��ICP��2022002427��-10 �湫��������43070202000427��© 2013~2025 haote.com ������