Implement TCP Client

i wrote an easy TCP/IP Server in Python and a client in Javascript. if i start it in cmd on two computers it works perfect.
now i wanted to implement it in my Application. It should connect when i start the application. But I just get a white screen. I read already, it´s not possible to implement a net.Socket on websites, but how is it in ionic?

I just kept it easy now, but at the end i want to send some values from the server to the Application. So just backend stuff.

here is my code:


var net = require('net');
var wert;

var client = new net.Socket();
client.connect(65432, '', function() {

client.on('data', function(data) {
	console.log('Received: ' + data);
	wert = data;
	client.destroy(); // kill client after server's response


import { Component } from '@angular/core';
import { Platform } from 'ionic-angular';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { ScreenOrientation } from '@ionic-native/screen-orientation';
import * as client from '../assets/data/client';

  templateUrl: 'app.html'
export class MyApp {
  rootPage:string = 'HomePage';

  constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen, public screenOrientation: ScreenOrientation) {
    platform.ready().then(() => {
      // Okay, so the platform is ready and our plugins are available.
      // Here you can do any higher level native things you might need.