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 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | 41x 41x 41x 41x 41x 41x 41x 41x 41x 41x 6x 6x 6x 6x 6x 41x 41x 41x 41x 41x 41x 5x 5x 41x 41x 41x 41x 41x 41x 41x 41x 1x 1x 1x 1x 1x 41x 41x 41x 41x 41x 41x 41x 41x 41x 41x 41x 41x 2x 2x 2x 2x 41x 41x 41x 41x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 41x 41x 41x 41x 4x 4x 41x 41x 41x 41x 1x 1x 41x | // Copyright (c) ZeroC, Inc. import { ParseException } from "./LocalExceptions.js"; import { HashUtil } from "./HashUtil.js"; import { WSEndpointInfo } from "./Endpoint.js"; import { EndpointI } from "./EndpointI.js"; import { WSTransceiver } from "./WSTransceiver.js"; export class WSEndpoint extends EndpointI { constructor(instance, delegate, resource) { super(); this._instance = instance; this._delegate = delegate; this._resource = resource || "/"; } getInfo() { return new WSEndpointInfo(this._delegate.getInfo(), this._resource); } type() { return this._delegate.type(); } protocol() { return this._delegate.protocol(); } streamWrite(s) { s.startEncapsulation(); this._delegate.streamWriteImpl(s); s.writeString(this._resource); s.endEncapsulation(); } timeout() { return this._delegate.timeout(); } connectionId() { return this._delegate.connectionId(); } changeTimeout(timeout) { if (timeout === this._delegate.timeout()) { return this; } else { return new WSEndpoint(this._instance, this._delegate.changeTimeout(timeout), this._resource); } } changeConnectionId(connectionId) { if (connectionId === this._delegate.connectionId()) { return this; } else { return new WSEndpoint(this._instance, this._delegate.changeConnectionId(connectionId), this._resource); } } compress() { return this._delegate.compress(); } changeCompress(compress) { if (compress === this._delegate.compress()) { return this; } else { return new WSEndpoint(this._instance, this._delegate.changeCompress(compress), this._resource); } } secure() { return this._delegate.secure(); } connect() { return new WSTransceiver(this._instance, this._delegate.secure(), this._delegate.getAddress(), this._resource); } hashCode() { let h = this._delegate.hashCode(); h = HashUtil.addString(h, this._resource); return h; } compareTo(p) { if (this === p) { return 0; } if (p === null) { return 1; } if (!(p instanceof WSEndpoint)) { return this.type() < p.type() ? -1 : 1; } const r = this._delegate.compareTo(p._delegate); if (r !== 0) { return r; } if (this._resource !== p._resource) { return this._resource < p._resource ? -1 : 1; } return 0; } options() { // // WARNING: Certain features, such as proxy validation in Glacier2, // depend on the format of proxy strings. Changes to toString() and // methods called to generate parts of the reference string could break // these features. Please review for all features that depend on the // format of proxyToString() before changing this and related code. // let s = this._delegate.options(); if (this._resource !== null && this._resource.length > 0) { s += " -r "; s += this._resource.indexOf(":") !== -1 ? '"' + this._resource + '"' : this._resource; } return s; } toConnectorString() { return this._delegate.toConnectorString(); } initWithStream(s) { this._resource = s.readString(); } checkOption(option, argument, endpoint) { if (option === "-r") { if (argument === null) { throw new ParseException(`no argument provided for -r option in endpoint ${endpoint}`); } this._resource = argument; } else { return false; } return true; } connectable() { return true; } } |