Can we use Unitys LLAPI to establish a socket connect with a server?

using UnityEngine;
using System.Collections;
using System.Net.Sockets;
using UnityEngine.Networking;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
using System.Text;
using System.Net;

public class WebSocketService : GenericSingleton<WebSocketService>
    int myReliableChannelId;
    int socketId;
    int socketPort = 8282;
    int connectionId;
    int recHostId;
    int recConnectionId;
    int recChannelId;
    const int bufferSize = 2048;
    byte[] recBuffer = new byte[bufferSize];

    int dataSize;
    byte error;
    string socketurl = "";

    void Start()

        ConnectionConfig config = new ConnectionConfig();
        myReliableChannelId = config.AddChannel(QosType.Reliable);
        int maxConnections = 10;
        HostTopology topology = new HostTopology(config, maxConnections);
        socketId = NetworkTransport.AddHost(topology, 8080);
        Debug.Log("Socket Open. SocketId is: " + socketId);


    public void Connect()
        byte error;
        connectionId = NetworkTransport.Connect(socketId, socketurl, socketPort, 0, out error);
        Debug.Log("Connected to server. ConnectionId: " + connectionId);
        Debug.Log("Error ? : " + error);

    public void SendSocketMessage(string msg)
        byte error;
        var bytes = Encoding.UTF8.GetBytes(msg);
        NetworkTransport.Send(socketId, connectionId, myReliableChannelId, bytes, bufferSize, out error);
        Debug.Log("Error ? : " + error);

    void Update()
        NetworkEventType recNetworkEvent = NetworkTransport.Receive(out recHostId, out recConnectionId, out recChannelId, recBuffer, bufferSize, out dataSize, out error);
        switch (recNetworkEvent)
            case NetworkEventType.Nothing:       
                Debug.Log(" NetworkEventType.Nothing");
            case NetworkEventType.ConnectEvent:    
                Debug.Log(" NetworkEventType.ConnectEvent");
            case NetworkEventType.DataEvent:      
                Debug.Log(" NetworkEventType.DataEvent");
            case NetworkEventType.DisconnectEvent: 
                Debug.Log("  NetworkEventType.DisconnectEvent");

am i doing this right?my socket endpoint is socketurl.
is there any other way to achieve this using unitys new networking suite.

8282 @LupaNafas