All files / src/Ice TcpEndpointFactory.js

100% Statements 33/33
100% Branches 7/7
100% Functions 6/6
100% Lines 33/33

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 3441x 41x 41x 41x 41x 41x 268x 268x 41x 41x 775x 775x 41x 41x 213x 213x 41x 41x 167x 167x 167x 167x 41x 41x 365x 365x 365x 365x 41x 41x 134x 134x 41x  
// Copyright (c) ZeroC, Inc.
 
import { TcpEndpointI } from "./TcpEndpointI.js";
 
export class TcpEndpointFactory {
    constructor(instance) {
        this._instance = instance;
    }
 
    type() {
        return this._instance.type();
    }
 
    protocol() {
        return this._instance.protocol();
    }
 
    create(args, oaEndpoint) {
        const e = new TcpEndpointI(this._instance);
        e.initWithOptions(args, oaEndpoint);
        return e;
    }
 
    read(s) {
        const e = new TcpEndpointI(this._instance);
        e.initWithStream(s);
        return e;
    }
 
    clone(instance) {
        return new TcpEndpointFactory(instance);
    }
}