xuanyu66 commented on pull request #6910:
URL: https://github.com/apache/skywalking/pull/6910#issuecomment-834081783


   > Could you explain about new transport? Why wouldn't we enhance that?
   
   It's jaeger that implement ThriftUdpTransport for UdpSender
   
   ```
   public class UdpSender extends ThriftSender {
     public static final String DEFAULT_AGENT_UDP_HOST = "localhost";
     public static final int DEFAULT_AGENT_UDP_COMPACT_PORT = 6831;
   
     @ToString.Exclude private Agent.Client agentClient;
     @ToString.Exclude private ThriftUdpTransport udpTransport;
   
     /**
      * This constructor expects Jaeger running running on {@value 
#DEFAULT_AGENT_UDP_HOST}
      * and port {@value #DEFAULT_AGENT_UDP_COMPACT_PORT}
      */
     public UdpSender() {
       this(DEFAULT_AGENT_UDP_HOST, DEFAULT_AGENT_UDP_COMPACT_PORT, 0);
     }
   
     /**
      * @param host host e.g. {@value DEFAULT_AGENT_UDP_HOST}
      * @param port port e.g. {@value DEFAULT_AGENT_UDP_COMPACT_PORT}
      * @param maxPacketSize if 0 it will use {@value 
ThriftUdpTransport#MAX_PACKET_SIZE}
      */
     public UdpSender(String host, int port, int maxPacketSize) {
       super(ProtocolType.Compact, maxPacketSize);
   
       if (host == null || host.length() == 0) {
         host = DEFAULT_AGENT_UDP_HOST;
       }
   
       if (port == 0) {
         port = DEFAULT_AGENT_UDP_COMPACT_PORT;
       }
   
       udpTransport = ThriftUdpTransport.newThriftUdpClient(host, port);
       agentClient = new 
Agent.Client(protocolFactory.getProtocol(udpTransport));
     }
   ```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to