Commit cf26b5e7 authored by wei.xuan's avatar wei.xuan

fix:fix bug

parent b889df9d
......@@ -100,12 +100,12 @@ func newClient(t EndPointType, opts ...ClientOption) *client {
// NewTCPClient builds a tcp client.
func NewTCPClient(opts ...ClientOption) Client {
return newClient(TcpClient, opts...)
return newClient(TCP_CLIENT, opts...)
}
// NewUDPClient builds a connected udp client
func NewUDPClient(opts ...ClientOption) Client {
return newClient(UdpClient, opts...)
return newClient(UDP_CLIENT, opts...)
}
func (c *client) ID() EndPointID {
......@@ -323,11 +323,11 @@ func (c *client) dialWSS() Session {
func (c *client) dial() Session {
switch c.endPointType {
case TcpClient:
case TCP_CLIENT:
return c.dialTCP()
case UdpClient:
case UDP_CLIENT:
return c.dialUDP()
case WsClient:
case WS_CLIENT:
return c.dialWS()
case WSS_CLIENT:
return c.dialWSS()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment