public bool connect(string host, int port)
    {
        socket = new TcpClient();

        try {
            socket.Connect(host, port);
        } catch (SocketException e) {
            Debug.LogException(e);
            return(false);
        }

        connected = true;

        stream = socket.GetStream();
        writer = new BinaryWriter(stream);

        sout   = new AstronStream();
        odgram = new DatagramOut(sout);

        beginReceiveData();

        return(connected);
    }
 public DatagramOut(AstronStream s) : base(s)
 {
 }