Search in sources :

Example 26 with DomainSocketAddress

use of io.netty.channel.unix.DomainSocketAddress in project grpc-java by grpc.

the class ChannelzProtoUtilTest method toAddress_uds.

@Test
public void toAddress_uds() throws Exception {
    String path = "/tmp/foo";
    DomainSocketAddress uds = new DomainSocketAddress(path);
    assertEquals(Address.newBuilder().setUdsAddress(UdsAddress.newBuilder().setFilename(path)).build(), ChannelzProtoUtil.toAddress(uds));
}
Also used : DomainSocketAddress(io.netty.channel.unix.DomainSocketAddress) ByteString(com.google.protobuf.ByteString) Test(org.junit.Test)

Aggregations

DomainSocketAddress (io.netty.channel.unix.DomainSocketAddress)23 File (java.io.File)11 InetSocketAddress (java.net.InetSocketAddress)9 SocketAddress (java.net.SocketAddress)8 IOException (java.io.IOException)7 Test (org.junit.Test)6 ByteString (com.google.protobuf.ByteString)5 ByteBuf (io.netty.buffer.ByteBuf)4 AddressedEnvelope (io.netty.channel.AddressedEnvelope)4 DefaultAddressedEnvelope (io.netty.channel.DefaultAddressedEnvelope)4 Test (org.junit.jupiter.api.Test)4 PeerCredentials (io.netty.channel.unix.PeerCredentials)3 SocketTest (io.netty.channel.unix.tests.SocketTest)3 DomainSocketAddress (org.apache.beam.vendor.grpc.v1p43p2.io.netty.channel.unix.DomainSocketAddress)3 DomainDatagramPacket (io.netty.channel.unix.DomainDatagramPacket)2 DomainDatagramSocketAddress (io.netty.channel.unix.DomainDatagramSocketAddress)2 IovArray (io.netty.channel.unix.IovArray)2 ByteBuffer (java.nio.ByteBuffer)2 GrpcServerBuilder (alluxio.grpc.GrpcServerBuilder)1 HostAndPort (com.google.common.net.HostAndPort)1