import { _ } from 'streamline-runtime' ; import { fixOptions } from './node' ; import * as streams from '../node-wrappers' ; export type SocketServer = streams . SocketServer ; export type SocketServerOptions = streams . SocketServerOptions ; export type SocketStream = streams . SocketStream ; export type SocketOptions = streams . SocketOptions ; export type SocketClient = streams . SocketClient ; export function server ( listener , streamOptions ? , serverOptions ? ) { if ( typeof streamOptions === "function" ) return streams . createNetServer ( arguments [ 0 ] , arguments [ 1 ] , fixOptions ( arguments [ 2 ] ) ) ; return streams . createNetServer ( serverOptions ! , listener , fixOptions ( streamOptions ) ) ; } export function tcpClient ( port , host ? , options ? ) { return streams . tcpClient ( port , host , fixOptions ( options ) ) ; } export function socketClient ( path , options ) { return streams . socketClient ( path , fixOptions ( options ) ) ; }